From 5b20261fc4c32e7a7c3b523de5e24c011c204dae Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 13 Apr 1999 15:04:45 +0000 Subject: if people want to run scripts in runlevel 1, let them --- rc.d/init.d/single | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'rc.d') 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 -- cgit v1.2.1