Author: dj
Date: 2011-05-14 12:46:00 -0600 (Sat, 14 May 2011)
New Revision: 9526

Modified:
   trunk/BOOK/bootscripts/contrib/lsb-v3/ChangeLog
   trunk/BOOK/bootscripts/contrib/lsb-v3/init.d/checkfs
   trunk/BOOK/bootscripts/contrib/lsb-v3/init.d/udev
   trunk/BOOK/bootscripts/contrib/lsb-v3/sysconfig/rc.site
Log:
Added FAILURE_ACTION variable to rc.site

Modified: trunk/BOOK/bootscripts/contrib/lsb-v3/ChangeLog
===================================================================
--- trunk/BOOK/bootscripts/contrib/lsb-v3/ChangeLog     2011-05-13 02:28:49 UTC 
(rev 9525)
+++ trunk/BOOK/bootscripts/contrib/lsb-v3/ChangeLog     2011-05-14 18:46:00 UTC 
(rev 9526)
@@ -1,5 +1,9 @@
 ChangeLog
 
+20110514 - [dj]
+       * Added FAILURE_ACTION variable to rc.site for use in remote systems
+          where user input is not appropriate in the event of a failure
+
 20110424 - [dj]
         * Sync to LFS-Bootscripts-20110424 (move new run mounts and
           symlinks [bdubbs]).

Modified: trunk/BOOK/bootscripts/contrib/lsb-v3/init.d/checkfs
===================================================================
--- trunk/BOOK/bootscripts/contrib/lsb-v3/init.d/checkfs        2011-05-13 
02:28:49 UTC (rev 9525)
+++ trunk/BOOK/bootscripts/contrib/lsb-v3/init.d/checkfs        2011-05-14 
18:46:00 UTC (rev 9526)
@@ -35,7 +35,7 @@
             echo -e -n "${FAILURE}After you press Enter, this system will be "
             echo -e "${FAILURE}halted and powered off.\n"
             echo -e "${INFO}Press enter to continue...${NORMAL}"
-            read ENTER
+            $FAILURE_ACTION
             /etc/rc.d/init.d/halt stop
         fi
 
@@ -71,7 +71,7 @@
             echo -e "${WARNING}this system to be rebooted.\n"
             echo -e "After you press enter, this system will be rebooted.\n"
             echo -e "${INFO}Press Enter to continue...${NORMAL}"
-            read ENTER
+            $FAILURE_ACTION
             reboot -f
         elif [ "${error_value}" -gt 3 -a "${error_value}" -lt 16 ]; then
             log_failure_msg "Checking file systems..."
@@ -84,7 +84,7 @@
             echo -e "${FAILURE}After you press Enter, this system will be"
             echo -e "${FAILURE}halted and powered off.\n"
             echo -e "${INFO}Press Enter to continue...${NORMAL}"
-            read ENTER
+            $FAILURE_ACTION
             /etc/rc.d/init.d/halt stop
         elif [ "${error_value}" -ge 16 ]; then
             log_failure_msg "Checking file systems..."

Modified: trunk/BOOK/bootscripts/contrib/lsb-v3/init.d/udev
===================================================================
--- trunk/BOOK/bootscripts/contrib/lsb-v3/init.d/udev   2011-05-13 02:28:49 UTC 
(rev 9525)
+++ trunk/BOOK/bootscripts/contrib/lsb-v3/init.d/udev   2011-05-14 18:46:00 UTC 
(rev 9526)
@@ -29,7 +29,7 @@
                        boot_mesg -n " will be halted and powered off."
                        boot_mesg -n "\n\nPress Enter to continue..." ${INFO}
                        boot_mesg "" ${NORMAL}
-                       read ENTER
+                       $FAILURE_ACTION
                        /etc/rc.d/init.d/halt stop
                fi
 
@@ -48,7 +48,7 @@
                        boot_mesg -n " will be halted and powered off."
                        boot_mesg -n "\n\nPress Enter to continue..." ${INFO}
                        boot_mesg "" ${NORMAL}
-                       read ENTER
+                       $FAILURE_ACTION
                        /etc/rc.d/init.d/halt stop
                fi
 

Modified: trunk/BOOK/bootscripts/contrib/lsb-v3/sysconfig/rc.site
===================================================================
--- trunk/BOOK/bootscripts/contrib/lsb-v3/sysconfig/rc.site     2011-05-13 
02:28:49 UTC (rev 9525)
+++ trunk/BOOK/bootscripts/contrib/lsb-v3/sysconfig/rc.site     2011-05-14 
18:46:00 UTC (rev 9526)
@@ -13,6 +13,10 @@
 # Bootlogging (requires a tempfs mount)
 BOOTLOG_ENAB="yes"
 
+# Manual input is not appropriate on remote systems. Define what happens when
+# an error is encountered that interupts the boot/shutdown proceess
+FAILURE_ACTION="read ENTER"
+
 # Distro Information
 DISTRO="Linux From Scratch" # The distro name
 DISTRO_CONTACT="[email protected]" # Bug report address
@@ -33,6 +37,7 @@
 
 # Export varialbles so that they are inherited by the initscripts
 export RC_BASE RC_FUNCTIONS NETWORK_DEVICES TEMPFS_MOUNT BOOTLOG_ENAB
+export FAILURE_ACTION
 export DISTRO DISTRO_CONTACT DISTRO_MINI
 export BRACKET FAILURE INFO NORMAL SUCCESS WARNING
 export PREFIX_SUCCESS PREFIX_WARNING PREFIX_FAILURE
@@ -64,6 +69,6 @@
     echo -e ""
     echo -e "${INFO}Press Enter to continue..."
     echo -e "${NORMAL}"
-    read ENTER
+    $FAILURE_ACTION
 }
 

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to