Commit c784d3e4 authored by Leigh B Stoller's avatar Leigh B Stoller

Fix regex that determines if a profile script is parameterized.

parent f13deafb
......@@ -186,7 +186,7 @@ $EUID = $UID;
# JSON block.
#
if ($getparams && !$paramfile &&
system("egrep -q -s 'defineParameter' $file")) {
system("egrep -q -s '^[^#]*defineParameter' $file")) {
# No parameters, return empty block.
if (defined($ofile)) {
system("echo '' > $ofile");
......
......@@ -329,7 +329,7 @@ elsif (! -s $ofile) {
else {
if ($getparams) {
if (! -e $pfile) {
if (system("egrep -q -s 'defineParameter' $ifile")) {
if (system("egrep -q -s '^[^#]*defineParameter' $ifile")) {
# No parameters
system("touch $pfile");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment