aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/rc
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-02-03 17:06:47 +0000
committerBill Nottingham <notting@redhat.com>1999-02-03 17:06:47 +0000
commitc3695a8497dcbc4f5dc3348f9dd0f4ffb01badee (patch)
treec5e85c9a3ac67e6eeba55138eaa9742004235844 /rc.d/rc
parent7b45621175cebb8ad2a59901e26593811047e818 (diff)
downloadinitscripts-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-xrc.d/rc26
1 files changed, 26 insertions, 0 deletions
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