diff options
Diffstat (limited to 'usr.sbin/pc-sysinstall/backend/functions-parse.sh')
-rwxr-xr-x | usr.sbin/pc-sysinstall/backend/functions-parse.sh | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/usr.sbin/pc-sysinstall/backend/functions-parse.sh b/usr.sbin/pc-sysinstall/backend/functions-parse.sh index a95cb33..3604ba4 100755 --- a/usr.sbin/pc-sysinstall/backend/functions-parse.sh +++ b/usr.sbin/pc-sysinstall/backend/functions-parse.sh @@ -132,19 +132,19 @@ file_sanity_check() then for i in $1 do - grep "^${i}=" $CFGF >/dev/null 2>/dev/null - if [ "$?" = "0" ] - then - LN=`grep "^${i}=" ${CFGF} | head -n 1 | cut -d '=' -f 2 | tr -d ' '` - if [ -z "${LN}" ] - then - echo "Error: Config fails sanity test! ${i}= is empty" - exit 1 - fi - else - echo "Error: Config fails sanity test! Missing ${i}=" - exit 1 - fi + grep "^${i}=" $CFGF >/dev/null 2>/dev/null + if [ "$?" = "0" ] + then + LN=`grep "^${i}=" ${CFGF} | head -n 1 | cut -d '=' -f 2 | tr -d ' '` + if [ -z "${LN}" ] + then + echo "Error: Config fails sanity test! ${i}= is empty" + exit 1 + fi + else + echo "Error: Config fails sanity test! Missing ${i}=" + exit 1 + fi done else echo "Error: Missing config file, and / or values to sanity check for!" |