[PC-BSD Commits] r6445 - pcbsd/trunk/mfsroot-overlay/root

svn at pcbsd.org svn at pcbsd.org
Fri Mar 26 10:43:28 PDT 2010


Author: kris
Date: 2010-03-26 10:43:28 -0700 (Fri, 26 Mar 2010)
New Revision: 6445

Modified:
   pcbsd/trunk/mfsroot-overlay/root/.xinitrc
   pcbsd/trunk/mfsroot-overlay/root/PCBSDStart.sh
Log:

Update mfsroot scripts, we have had a number of failures where the installer shuts down and reboots the system
without letting us see what is causing the error, now don't reboot automatically



Modified: pcbsd/trunk/mfsroot-overlay/root/.xinitrc
===================================================================
--- pcbsd/trunk/mfsroot-overlay/root/.xinitrc	2010-03-26 13:16:35 UTC (rev 6444)
+++ pcbsd/trunk/mfsroot-overlay/root/.xinitrc	2010-03-26 17:43:28 UTC (rev 6445)
@@ -18,6 +18,4 @@
 
 # Start the installer
 /PCBSD/SysInstaller/bin/SysInstaller
-
-# All finished, reboot now
-shutdown -r now
+echo "$?" > /root/.exitStatus

Modified: pcbsd/trunk/mfsroot-overlay/root/PCBSDStart.sh
===================================================================
--- pcbsd/trunk/mfsroot-overlay/root/PCBSDStart.sh	2010-03-26 13:16:35 UTC (rev 6444)
+++ pcbsd/trunk/mfsroot-overlay/root/PCBSDStart.sh	2010-03-26 17:43:28 UTC (rev 6445)
@@ -8,6 +8,14 @@
 LC_CTYPE="en_US.UTF-8" ; export LC_CTYPE     
 LC_COLLATE="POSIX" ; export LC_COLLATE
 
+# Make sure this is only executed on the first login, in order for other ctrl-fX screens to work
+if [ -f "/tmp/1stRun" ] 
+then
+  exit
+fi
+
+touch /tmp/1stRun
+
 # Make /var/tmp link
 mv /var/tmp /tmp/vartmp
 ln -s /tmp/vartmp /var/tmp
@@ -35,11 +43,7 @@
   /PCBSD/pc-sysinstall/pc-sysinstall start-autoinstall /tmp/pc-autoinstall.conf
 fi
 
-# Make sure this is only executed on the first login, in order for other ctrl-fX screens to work
-if [ ! -f "/tmp/1stRun" ] 
-then
 
-touch /tmp/1stRun
 
 # Run the intial sorting of directories
 mv /root/.fluxbox /uzip/
@@ -93,7 +97,18 @@
   fi
 fi
 
-
-shutdown -r now
-
+# Check if we had a successful SysInstaller exit
+if [ -e "/root/.exitStatus" ] ; then
+  STATUS="`cat /root/.exitStatus`"
+  if [ "$STATUS" = "0" ] ; then
+    shutdown -r now
+  else
+    echo "Installation failed! Press any key to drop to shell or type 'reboot' to restart the system"
+    read tmp
+    if [ "$tmp" = "reboot" ] ; then
+      shutdown -r now
+    else
+      /bin/sh
+    fi
+  fi
 fi



More information about the Commits mailing list