Browse Source

Stefan Paletta:

unbroke single-user runlevel


git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@2555 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
rocklinux
Stefan Paletta 21 years ago
parent
commit
d7366f8355
2 changed files with 9 additions and 19 deletions
  1. +1
    -15
      package/base/sysfiles/etc_rc.d_rc.txt
  2. +8
    -4
      package/base/sysfiles/system.init

+ 1
- 15
package/base/sysfiles/etc_rc.d_rc.txt

@ -30,21 +30,7 @@ fi
echo "RC: Enter runlevel $RUNLEVEL ..."
if [ $RUNLEVEL = S ]
then
#
# Kill all processes
#
echo "Sending all processes a SIGTERM (15) ..."
killall5 -15
sleep 5
echo "Sending all processes a 2nd SIGTERM (15) ..."
killall5 -15
sleep 3
echo "Sending all processes a SIGKILL (9) ..."
killall5 -9
sleep 3
elif [ $RUNLEVEL != 0 -a $RUNLEVEL != 6 ]
if [ $RUNLEVEL != 0 -a $RUNLEVEL != 6 -a $RUNLEVEL != S ]
then
#
# run the START scripts of the current (new) runlevel

+ 8
- 4
package/base/sysfiles/system.init

@ -205,10 +205,14 @@ dnl
sleep 1 ; sync ; sleep 1
dnl
block_split()
[ "$RUNLEVEL" = 0 ] && command=halt || command=reboot
echo "Going to $command the system ..."
$command -d -f -i -p
while true ; do sleep 1 ; done
command=""
[ "$RUNLEVEL" = 0 ] && command=halt
[ "$RUNLEVEL" = 6 ] && command=reboot
if [ -n "$command" ] ; then
echo "Going to $command the system ..."
$command -d -f -i -p
while true ; do sleep 1 ; done
fi
block_end
main_end

Loading…
Cancel
Save