[PC-BSD Commits] r5077 - pcbsd/trunk/mfsroot-overlay/etc

svn at pcbsd.org svn at pcbsd.org
Wed Nov 18 17:05:13 PST 2009


Author: kris
Date: 2009-11-18 17:05:13 -0800 (Wed, 18 Nov 2009)
New Revision: 5077

Modified:
   pcbsd/trunk/mfsroot-overlay/etc/SetupInstall.sh
   pcbsd/trunk/mfsroot-overlay/etc/pcbsd-rc.sh
Log:

Update test for automated install config, copy it from CD while its mounted at bootup



Modified: pcbsd/trunk/mfsroot-overlay/etc/SetupInstall.sh
===================================================================
--- pcbsd/trunk/mfsroot-overlay/etc/SetupInstall.sh	2009-11-19 00:41:04 UTC (rev 5076)
+++ pcbsd/trunk/mfsroot-overlay/etc/SetupInstall.sh	2009-11-19 01:05:13 UTC (rev 5077)
@@ -16,4 +16,31 @@
 MDDEVICE="`/sbin/mdconfig -a -t vnode -o readonly -f /uzip/usr.uzip`.uzip"
 /sbin/mount -r /dev/$MDDEVICE /usr
 
+PATH="${PATH}:/usr/bin"
+export PATH
+
+# Check if we have a pc-autoinstall.conf file
+if [ -e "/cdmnt/boot/pc-autoinstall.conf" ]
+then
+  # We have one, copy it over so that pc-sysinstall can parse it later during the bootup
+  cp /cdmnt/boot/pc-autoinstall.conf /tmp/pc-autoinstall.conf
+  
+  # Check if the config file is on disk as well
+  PC-CFG=`grep "pc_config:" /tmp/pc-autoinstall.conf | grep -v "^#" | cut -d ':' -f 2 | tr -d ' '`
+
+  # Check that this isn't a http / ftp file we need to fetch later
+  echo "${PC-CFG}" | grep -e "^http" -e "^ftp" > /dev/null 2>/dev/null
+  if [ "$?" != "0" ]
+  then
+    if [ -e "/cdmnt/${PC-CFG}" ]
+    then
+      cp /cdmnt/${PC-CFG} /tmp/pc-sysinstall.cfg
+    else
+      echo "ERROR: pc_config: ${PC-CFG} isn't on the boot media! Automated install aborted!"
+      rm /tmp/pc-autoinstall.conf
+    fi 
+  fi
+  
+fi
+
 /sbin/umount /cdmnt

Modified: pcbsd/trunk/mfsroot-overlay/etc/pcbsd-rc.sh
===================================================================
--- pcbsd/trunk/mfsroot-overlay/etc/pcbsd-rc.sh	2009-11-19 00:41:04 UTC (rev 5076)
+++ pcbsd/trunk/mfsroot-overlay/etc/pcbsd-rc.sh	2009-11-19 01:05:13 UTC (rev 5077)
@@ -161,13 +161,6 @@
 # Create a /tmp file system with some extra space
 /sbin/mdmfs -S -s 15M -O space md6 /tmp
 
-# Check if we have a pc-autoinstall.conf file
-if [ -e "/cdmnt/boot/pc-autoinstall.conf" ]
-then
-  # We have one, copy it over so that pc-sysinstall can parse it later during the bootup
-  cp /cdmnt/boot/pc-autoinstall.conf /tmp/pc-autoinstall.conf
-fi
-
 if [ "$bootlive" = "YES" -a -e "/cdmnt/PCBSD.ufs.uzip" ]
 then
   # We are running in LIVE mode



More information about the Commits mailing list