aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/single
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d/init.d/single')
-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