summaryrefslogtreecommitdiffstats
path: root/usr/sbin/pc-sysinstall/backend/functions-parse.sh
diff options
context:
space:
mode:
Diffstat (limited to 'usr/sbin/pc-sysinstall/backend/functions-parse.sh')
-rwxr-xr-xusr/sbin/pc-sysinstall/backend/functions-parse.sh29
1 files changed, 15 insertions, 14 deletions
diff --git a/usr/sbin/pc-sysinstall/backend/functions-parse.sh b/usr/sbin/pc-sysinstall/backend/functions-parse.sh
index a9453cc..d8e5723 100755
--- a/usr/sbin/pc-sysinstall/backend/functions-parse.sh
+++ b/usr/sbin/pc-sysinstall/backend/functions-parse.sh
@@ -23,7 +23,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $FreeBSD: src/usr.sbin/pc-sysinstall/backend/functions-parse.sh,v 1.2 2010/06/27 16:46:11 imp Exp $
+# $FreeBSD: src/usr.sbin/pc-sysinstall/backend/functions-parse.sh,v 1.4 2010/09/08 20:10:24 imp Exp $
# functions.sh
# Library of functions which pc-sysinstall may call upon for parsing the config
@@ -85,6 +85,7 @@ if_check_value_exists()
VALID="1"
for i in ${2}
do
+ VAL=`echo "$VAL"|tr A-Z a-z`
if [ "$VAL" = "${i}" ]
then
VALID="0"
@@ -132,19 +133,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!"
OpenPOWER on IntegriCloud