diff options
author | DJ Lucas <dj@linuxfromscratch.org> | 2011-05-23 05:07:21 +0000 |
---|---|---|
committer | DJ Lucas <dj@linuxfromscratch.org> | 2011-05-23 05:07:21 +0000 |
commit | f3f65e73a3e8e1b7d925be3ee6b0e40b03252804 (patch) | |
tree | 062eb7b4c317aca93cbedd8fe29ef63d971468ef /lsb-bootscripts/etc | |
parent | 90b457477d7909f501615eec5a18efd29944298a (diff) |
Added stop_on_error parameter to rc.site and cleaned up Begin and End lines.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9552 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'lsb-bootscripts/etc')
-rw-r--r-- | lsb-bootscripts/etc/default/rc | 15 | ||||
-rw-r--r-- | lsb-bootscripts/etc/default/rc.site | 16 | ||||
-rw-r--r-- | lsb-bootscripts/etc/init.d/checkfs | 4 | ||||
-rw-r--r-- | lsb-bootscripts/etc/init.d/cleanfs | 5 | ||||
-rw-r--r-- | lsb-bootscripts/etc/init.d/console | 4 | ||||
-rw-r--r-- | lsb-bootscripts/etc/init.d/halt | 2 | ||||
-rw-r--r-- | lsb-bootscripts/etc/init.d/localnet | 4 | ||||
-rw-r--r-- | lsb-bootscripts/etc/init.d/modules | 4 | ||||
-rw-r--r-- | lsb-bootscripts/etc/init.d/mountfs | 4 | ||||
-rw-r--r-- | lsb-bootscripts/etc/init.d/mountvirtfs | 4 | ||||
-rw-r--r-- | lsb-bootscripts/etc/init.d/network | 4 | ||||
-rw-r--r-- | lsb-bootscripts/etc/init.d/reboot | 4 | ||||
-rw-r--r-- | lsb-bootscripts/etc/init.d/sendsignals | 4 | ||||
-rw-r--r-- | lsb-bootscripts/etc/init.d/setclock | 4 | ||||
-rw-r--r-- | lsb-bootscripts/etc/init.d/swap | 4 | ||||
-rw-r--r-- | lsb-bootscripts/etc/init.d/sysctl | 4 | ||||
-rw-r--r-- | lsb-bootscripts/etc/init.d/sysklogd | 4 | ||||
-rw-r--r-- | lsb-bootscripts/etc/init.d/template | 4 | ||||
-rw-r--r-- | lsb-bootscripts/etc/init.d/udev | 4 | ||||
-rw-r--r-- | lsb-bootscripts/etc/init.d/udev_retry | 4 |
20 files changed, 57 insertions, 45 deletions
diff --git a/lsb-bootscripts/etc/default/rc b/lsb-bootscripts/etc/default/rc index 4b756c54f..f821de9c4 100644 --- a/lsb-bootscripts/etc/default/rc +++ b/lsb-bootscripts/etc/default/rc @@ -1,8 +1,5 @@ # Begin /etc/default/rc -# Author: DJ Lucas - dj@linuxfromscratch.org -# Version: 1.0 LSB V.3.1 - # Global variable inherited by initscripts are in caps # Local variables for the rc script are in lowercase @@ -10,7 +7,7 @@ . /etc/default/rc.site # Set base directory information -RC_BASE="ETCDIR" +RC_BASE="/etc/rc.d" # Location of network device scripts and config files NETWORK_DEVICES="/etc/network" @@ -74,6 +71,16 @@ ilen="38" # The total length of the interactive message welcome_message="Welcome to ${INFO}${DISTRO}${NORMAL}" i_message="Press '${FAILURE}I${NORMAL}' to enter interactive startup" +# FAILURE_ACTION (what to do when script failure occurs) +case "${stop_on_error}" in + Y* | y* | 0) + FAILURE_ACTION='read Enter' + ;; + *) + FAILURE_ACTION='echo ""' + ;; +esac + # Error message displayed when a script's exit value is not zero print_error_msg() { diff --git a/lsb-bootscripts/etc/default/rc.site b/lsb-bootscripts/etc/default/rc.site index 34f25cc79..1e77b942d 100644 --- a/lsb-bootscripts/etc/default/rc.site +++ b/lsb-bootscripts/etc/default/rc.site @@ -1,3 +1,8 @@ +# Begin /etc/default/rc.site + +# Global variable inherited by initscripts are in caps +# Local variables for the rc script are in lowercase + # Bootlogging (requires a tempfs mount) BOOTLOG_ENAB="yes" @@ -8,14 +13,15 @@ HOSTNAME=<lfs> UTC=1 CLOCKPARAMS= -# 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" - # Export varialbles so that they are inherited by the initscripts -export BOOTLOG_ENAB HOSTNAME UTC CLOCKPARAMS FAILURE_ACTION +export BOOTLOG_ENAB HOSTNAME UTC CLOCKPARAMS # Interactive startup iprompt="yes" # Wether to display the interactive boot promp itime="2" # The ammount of time (in seconds) to display the prompt +# Manual input is not appropriate on remote systems. Wait for user input on +# script error? +stop_on_error="yes" + +# End /etc/default/rc.site diff --git a/lsb-bootscripts/etc/init.d/checkfs b/lsb-bootscripts/etc/init.d/checkfs index 1e3efed9b..ade693577 100644 --- a/lsb-bootscripts/etc/init.d/checkfs +++ b/lsb-bootscripts/etc/init.d/checkfs @@ -1,5 +1,5 @@ #!/bin/sh -# Begin /etc/init.d/checkfs +# Begin $RC_BASE/init.d/checkfs ### BEGIN INIT INFO # Provides: checkfs @@ -100,4 +100,4 @@ case "${1}" in ;; esac -# End /etc/init.d/checkfs +# End $RC_BASE/init.d/checkfs diff --git a/lsb-bootscripts/etc/init.d/cleanfs b/lsb-bootscripts/etc/init.d/cleanfs index 26a0c2096..b455d3fd9 100644 --- a/lsb-bootscripts/etc/init.d/cleanfs +++ b/lsb-bootscripts/etc/init.d/cleanfs @@ -1,5 +1,5 @@ #!/bin/sh -# Begin /etc/init.d/cleanfs +# Begin $RC_BASE/init.d/cleanfs ### BEGIN INIT INFO # Provides: cleanfs @@ -102,5 +102,4 @@ case "${1}" in ;; esac -# End /etc/init.d/cleanfs - +# End $RC_BASE/init.d/cleanfs diff --git a/lsb-bootscripts/etc/init.d/console b/lsb-bootscripts/etc/init.d/console index 45c87b6dd..f25630d0e 100644 --- a/lsb-bootscripts/etc/init.d/console +++ b/lsb-bootscripts/etc/init.d/console @@ -1,5 +1,5 @@ #!/bin/sh -# Begin $rc_base/init.d/console +# Begin $RC_BASE/init.d/console ### BEGIN INIT INFO # Provides: console @@ -93,4 +93,4 @@ case "${1}" in ;; esac -# End $rc_base/init.d/console +# End $RC_BASE/init.d/console diff --git a/lsb-bootscripts/etc/init.d/halt b/lsb-bootscripts/etc/init.d/halt index cdcd90778..281e5aff5 100644 --- a/lsb-bootscripts/etc/init.d/halt +++ b/lsb-bootscripts/etc/init.d/halt @@ -27,4 +27,4 @@ case "${1}" in ;; esac -# End /etc/init.d/halt +# End $RC_BASE/init.d/halt diff --git a/lsb-bootscripts/etc/init.d/localnet b/lsb-bootscripts/etc/init.d/localnet index 322bb8749..cb682e649 100644 --- a/lsb-bootscripts/etc/init.d/localnet +++ b/lsb-bootscripts/etc/init.d/localnet @@ -1,5 +1,5 @@ #!/bin/sh -# Begin /etc/init.d/localnet +# Begin $RC_BASE/init.d/localnet ### BEGIN INIT INFO # Provides: localnet @@ -78,4 +78,4 @@ case "${1}" in ;; esac -# End /etc/init.d/localnet +# End $RC_BASE/init.d/localnet diff --git a/lsb-bootscripts/etc/init.d/modules b/lsb-bootscripts/etc/init.d/modules index 18febfbc0..d173c7727 100644 --- a/lsb-bootscripts/etc/init.d/modules +++ b/lsb-bootscripts/etc/init.d/modules @@ -1,5 +1,5 @@ #!/bin/sh -# Begin /etc/init.d/modules +# Begin $RC_BASE/init.d/modules ### BEGIN INIT INFO # Provides: modules @@ -94,4 +94,4 @@ case "${1}" in ;; esac -# End /etc/init.d/modules +# End $RC_BASE/init.d/modules diff --git a/lsb-bootscripts/etc/init.d/mountfs b/lsb-bootscripts/etc/init.d/mountfs index 562db546a..578cb140a 100644 --- a/lsb-bootscripts/etc/init.d/mountfs +++ b/lsb-bootscripts/etc/init.d/mountfs @@ -1,5 +1,5 @@ #!/bin/sh -# Begin /etc/init.d/mountfs +# Begin $RC_BASE/init.d/mountfs ### BEGIN INIT INFO # Provides: $local_fs @@ -56,4 +56,4 @@ case "${1}" in ;; esac -# End /etc/init.d/mountfs +# End $RC_BASE/init.d/mountfs diff --git a/lsb-bootscripts/etc/init.d/mountvirtfs b/lsb-bootscripts/etc/init.d/mountvirtfs index 382404cc1..51f94a8b8 100644 --- a/lsb-bootscripts/etc/init.d/mountvirtfs +++ b/lsb-bootscripts/etc/init.d/mountvirtfs @@ -1,5 +1,5 @@ #!/bin/sh -# Begin /etc/init.d/mountvirtfs +# Begin $RC_BASE/init.d/mountvirtfs ### BEGIN INIT INFO # Provides: mountvirtfs @@ -43,4 +43,4 @@ case "${1}" in ;; esac -# End /etc/init.d/mountvirtfs +# End $RC_BASE/init.d/mountvirtfs diff --git a/lsb-bootscripts/etc/init.d/network b/lsb-bootscripts/etc/init.d/network index b725dd05a..ddd130391 100644 --- a/lsb-bootscripts/etc/init.d/network +++ b/lsb-bootscripts/etc/init.d/network @@ -1,5 +1,5 @@ #!/bin/sh -# Begin /etc/init.d/network +# Begin $RC_BASE/init.d/network ### BEGIN INIT INFO # Provides: $network @@ -81,4 +81,4 @@ case "${1}" in ;; esac -# End /etc/init.d/network +# End $RC_BASE/init.d/network diff --git a/lsb-bootscripts/etc/init.d/reboot b/lsb-bootscripts/etc/init.d/reboot index 56e948a3f..d7c33cef1 100644 --- a/lsb-bootscripts/etc/init.d/reboot +++ b/lsb-bootscripts/etc/init.d/reboot @@ -1,5 +1,5 @@ #!/bin/sh -# Begin /etc/init.d/reboot +# Begin $RC_BASE/init.d/reboot ### BEGIN INIT INFO # Provides: reboot @@ -29,4 +29,4 @@ case "${1}" in esac -# End /etc/init.d/reboot +# End $RC_BASE/init.d/reboot diff --git a/lsb-bootscripts/etc/init.d/sendsignals b/lsb-bootscripts/etc/init.d/sendsignals index 2cd9df84a..a09c7b0e2 100644 --- a/lsb-bootscripts/etc/init.d/sendsignals +++ b/lsb-bootscripts/etc/init.d/sendsignals @@ -1,5 +1,5 @@ #!/bin/sh -# Begin /etc/init.d/sendsignals +# Begin $RC_BASE/init.d/sendsignals ### BEGIN INIT INFO # Provides: sendsignals @@ -51,4 +51,4 @@ case "${1}" in esac -# End /etc/init.d/sendsignals +# End $RC_BASE/init.d/sendsignals diff --git a/lsb-bootscripts/etc/init.d/setclock b/lsb-bootscripts/etc/init.d/setclock index 5d47b8dc8..ab13e62c7 100644 --- a/lsb-bootscripts/etc/init.d/setclock +++ b/lsb-bootscripts/etc/init.d/setclock @@ -1,5 +1,5 @@ #!/bin/sh -# Begin /etc/init.d/setclock +# Begin $RC_BASE/init.d/setclock ### BEGIN INIT INFO # Provides: hwclock @@ -51,4 +51,4 @@ case ${1} in esac -# End /etc/init.d/setclock +# End $RC_BASE/init.d/setclock diff --git a/lsb-bootscripts/etc/init.d/swap b/lsb-bootscripts/etc/init.d/swap index 31e5591e5..7f74ec718 100644 --- a/lsb-bootscripts/etc/init.d/swap +++ b/lsb-bootscripts/etc/init.d/swap @@ -1,5 +1,5 @@ #!/bin/sh -# Begin /etc/init.d/swap +# Begin $RC_BASE/init.d/swap ### BEGIN INIT INFO # Provides: swap @@ -52,4 +52,4 @@ case "${1}" in ;; esac -# End /etc/init.d/swap +# End $RC_BASE/init.d/swap diff --git a/lsb-bootscripts/etc/init.d/sysctl b/lsb-bootscripts/etc/init.d/sysctl index cccff126e..8adea506e 100644 --- a/lsb-bootscripts/etc/init.d/sysctl +++ b/lsb-bootscripts/etc/init.d/sysctl @@ -1,5 +1,5 @@ #!/bin/sh -# Begin /etc/init.d/sysctl +# Begin $RC_BASE/init.d/sysctl ### BEGIN INIT INFO # Provides: sysctl @@ -36,4 +36,4 @@ case "${1}" in ;; esac -# End /etc/init.d/sysctl +# End $RC_BASE/init.d/sysctl diff --git a/lsb-bootscripts/etc/init.d/sysklogd b/lsb-bootscripts/etc/init.d/sysklogd index dc8829f07..0b5113779 100644 --- a/lsb-bootscripts/etc/init.d/sysklogd +++ b/lsb-bootscripts/etc/init.d/sysklogd @@ -1,5 +1,5 @@ #!/bin/sh -# Begin /etc/init.d/sysklogd +# Begin $RC_BASE/init.d/sysklogd ### BEGIN INIT INFO # Provides: $syslog @@ -66,4 +66,4 @@ case "${1}" in ;; esac -# End /etc/init.d/sysklogd +# End $RC_BASE/init.d/sysklogd diff --git a/lsb-bootscripts/etc/init.d/template b/lsb-bootscripts/etc/init.d/template index d10d98c56..4d4cf8c7b 100644 --- a/lsb-bootscripts/etc/init.d/template +++ b/lsb-bootscripts/etc/init.d/template @@ -1,5 +1,5 @@ #!/bin/sh -# Begin /etc/init.d/template +# Begin $RC_BASE/init.d/template ### BEGIN INIT INFO # Provides: template @@ -87,4 +87,4 @@ case "${1}" in ;; esac -# End /etc/init.d/template +# End $RC_BASE/init.d/template diff --git a/lsb-bootscripts/etc/init.d/udev b/lsb-bootscripts/etc/init.d/udev index 9f04ecb9e..bd23f8cee 100644 --- a/lsb-bootscripts/etc/init.d/udev +++ b/lsb-bootscripts/etc/init.d/udev @@ -1,5 +1,5 @@ #!/bin/sh -# Begin $rc_base/init.d/udev +# Begin $RC_BASE/init.d/udev ### BEGIN INIT INFO # Provides: udev @@ -87,4 +87,4 @@ case "${1}" in ;; esac -# End $rc_base/init.d/udev +# End $RC_BASE/init.d/udev diff --git a/lsb-bootscripts/etc/init.d/udev_retry b/lsb-bootscripts/etc/init.d/udev_retry index 24b956ae0..b9e7da8da 100644 --- a/lsb-bootscripts/etc/init.d/udev_retry +++ b/lsb-bootscripts/etc/init.d/udev_retry @@ -1,5 +1,5 @@ #!/bin/sh -# Begin $rc_base/init.d/udev_retry +# Begin $RC_BASE/init.d/udev_retry ### BEGIN INIT INFO # Provides: udev_retry @@ -46,4 +46,4 @@ case "${1}" in ;; esac -# End $rc_base/init.d/udev_retry +# End $RC_BASE/init.d/udev_retry |