aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-04-13 15:04:45 +0000
committerBill Nottingham <notting@redhat.com>1999-04-13 15:04:45 +0000
commit5b20261fc4c32e7a7c3b523de5e24c011c204dae (patch)
tree4f399e14e9ece33a0e07d927ec35b3b692a7c6ba /rc.d/init.d
parent7e922e3a5314ed011cea7350f86d1d69643a95f7 (diff)
downloadinitscripts-5b20261fc4c32e7a7c3b523de5e24c011c204dae.tar
initscripts-5b20261fc4c32e7a7c3b523de5e24c011c204dae.tar.gz
initscripts-5b20261fc4c32e7a7c3b523de5e24c011c204dae.tar.bz2
initscripts-5b20261fc4c32e7a7c3b523de5e24c011c204dae.tar.xz
initscripts-5b20261fc4c32e7a7c3b523de5e24c011c204dae.zip
if people want to run scripts in runlevel 1, let them
Diffstat (limited to 'rc.d/init.d')
-rwxr-xr-xrc.d/init.d/single18
1 files changed, 16 insertions, 2 deletions
diff --git a/rc.d/init.d/single b/rc.d/init.d/single
index 9f96fdeb..5de8fb5f 100755
--- a/rc.d/init.d/single
+++ b/rc.d/init.d/single
@@ -18,9 +18,11 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin
# Kill all processes.
[ "${BASH+bash}" = bash ] && enable kill
-action "Sending all processes the TERM signal..." kill -15 -1
+echo "Sending all processes the TERM signal..."
+kill -15 -1
sleep 5
-action "Sending all processes the KILL signal.." kill -9 -1
+echo "Sending all processes the KILL signal.."
+kill -9 -1
rm -f /var/lock/subsys/*
@@ -32,6 +34,18 @@ if [ -f /proc/sys/kernel/modprobe ]; then
echo "/sbin/modprobe" > /proc/sys/kernel/modprobe
fi
+# If they want to run something in single user mode, might as well run it...
+for i in /etc/rc.d/rc1.d/S[0-9][0-9]/S*; do
+ # Check if the script is there.
+ [ ! -f $i ] && continue
+
+ # Don't run [KS]??foo.{rpmsave,rpmorig} scripts
+ [ "${i%.rpmsave}" != "${i}" ] && continue
+ [ "${i%.rpmorig}" != "${i}" ] && continue
+ [ "$i" == /etc/rc.d/rc1.d/S00single ] && continue
+ $i start
+fi
+
# Now go to the single user level.
echo "Telling INIT to go to single user mode."
exec init -t1 S