diff options
author | Bill Nottingham <notting@redhat.com> | 1999-02-03 17:06:47 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 1999-02-03 17:06:47 +0000 |
commit | c3695a8497dcbc4f5dc3348f9dd0f4ffb01badee (patch) | |
tree | c5e85c9a3ac67e6eeba55138eaa9742004235844 /rc.d/rc | |
parent | 7b45621175cebb8ad2a59901e26593811047e818 (diff) | |
download | initscripts-c3695a8497dcbc4f5dc3348f9dd0f4ffb01badee.tar initscripts-c3695a8497dcbc4f5dc3348f9dd0f4ffb01badee.tar.gz initscripts-c3695a8497dcbc4f5dc3348f9dd0f4ffb01badee.tar.bz2 initscripts-c3695a8497dcbc4f5dc3348f9dd0f4ffb01badee.tar.xz initscripts-c3695a8497dcbc4f5dc3348f9dd0f4ffb01badee.zip |
add initlog stuff. do "halt -p", "umount -f" in shutdown. use %defattr in
specfile... um, I think that's it.
Diffstat (limited to 'rc.d/rc')
-rwxr-xr-x | rc.d/rc | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -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 |