[PC-BSD Commits] r5951 - pcbsd/trunk/pc-sysinstall/backend

svn at pcbsd.org svn at pcbsd.org
Mon Jan 11 07:20:17 PST 2010


Author: kris
Date: 2010-01-11 07:20:17 -0800 (Mon, 11 Jan 2010)
New Revision: 5951

Modified:
   pcbsd/trunk/pc-sysinstall/backend/functions-cleanup.sh
   pcbsd/trunk/pc-sysinstall/backend/functions-parse.sh
Log:

Added function to backend to get cfg values including spaces, and use it for root pw



Modified: pcbsd/trunk/pc-sysinstall/backend/functions-cleanup.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/functions-cleanup.sh	2010-01-11 10:05:00 UTC (rev 5950)
+++ pcbsd/trunk/pc-sysinstall/backend/functions-cleanup.sh	2010-01-11 15:20:17 UTC (rev 5951)
@@ -255,7 +255,7 @@
 # Function which sets the root password from the install config
 set_root_pw()
 {
-  get_value_from_cfg rootPass
+  get_value_from_cfg_with_spaces rootPass
   PW="${VAL}"
 
   # If we don't have a root pass, return

Modified: pcbsd/trunk/pc-sysinstall/backend/functions-parse.sh
===================================================================
--- pcbsd/trunk/pc-sysinstall/backend/functions-parse.sh	2010-01-11 10:05:00 UTC (rev 5950)
+++ pcbsd/trunk/pc-sysinstall/backend/functions-parse.sh	2010-01-11 15:20:17 UTC (rev 5951)
@@ -15,6 +15,19 @@
   fi
 };
 
+# Get the value from the cfg file including spaces
+get_value_from_cfg_with_spaces()
+{
+  if [ ! -z "${1}" ]
+  then
+    VAL=`grep "^${1}=" ${CFGF} | head -n 1 | cut -d '=' -f 2`
+    export VAL
+  else
+    exit_err "Error: Did we forgot to supply a setting to grab?"
+  fi
+};
+
+
 # Get the value from the cfg file
 get_value_from_cfg()
 {



More information about the Commits mailing list