From c3695a8497dcbc4f5dc3348f9dd0f4ffb01badee Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 3 Feb 1999 17:06:47 +0000 Subject: add initlog stuff. do "halt -p", "umount -f" in shutdown. use %defattr in specfile... um, I think that's it. --- rc.d/rc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'rc.d/rc') diff --git a/rc.d/rc b/rc.d/rc index aacd5f3f..05f63392 100755 --- a/rc.d/rc +++ b/rc.d/rc @@ -19,6 +19,15 @@ runlevel=$2 previous=$1 export runlevel previous +# See if we want to be in user confirmation mode +if [ "$previous" = "N" ]; then + if grep -i confirm /proc/cmdline >/dev/null ; then + CONFIRM=yes + else + CONFIRM= + fi +fi + # Get first argument. Set new runlevel to this argument. [ "$1" != "" ] && runlevel="$argv1" @@ -58,6 +67,23 @@ if [ -d /etc/rc.d/rc$runlevel.d ]; then subsys=${i#/etc/rc.d/rc$runlevel.d/S??} [ -f /var/lock/subsys/$subsys ] || \ [ -f /var/lock/subsys/${subsys}.init ] && continue + + # If we're in confirmation mode, get user confirmation + [ -n "$CONFIRM" ] && + { + confirm $subsys + case $? in + 0) + : + ;; + 2) + CONFIRM= + ;; + *) + continue + ;; + esac + } # Bring the subsystem up. $i start -- cgit v1.2.1