From 7f4117b05f9e4730657779ec7d4b3b08ba12616c Mon Sep 17 00:00:00 2001 From: Judd Vinet Date: Fri, 10 Oct 2003 01:10:18 +0000 Subject: added color to rc messages and fixed bug #168 --- rc.single | 66 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'rc.single') diff --git a/rc.single b/rc.single index 24837ff..f96c0fe 100755 --- a/rc.single +++ b/rc.single @@ -7,45 +7,45 @@ . /etc/rc.d/functions if [ "$PREVLEVEL" = "3" -o "$PREVLEVEL" = "5" ]; then - # Shutdown daemons - let i=${#DAEMONS[@]} - while [[ i -gt 0 ]]; do - if [[ `echo ${DAEMONS[$i]} | grep '^[^\!]' | wc -l` -eq 1 ]]; then - /etc/rc.d/${DAEMONS[$i]} stop - fi - let i=i-1 - done - # find any leftover daemons and shut them down - if [ -d /var/run/daemons ]; then - for daemon in `ls /var/run/daemons`; do - /etc/rc.d/$daemon stop - done - fi + # Shutdown daemons + let i=${#DAEMONS[@]} + while [[ i -gt 0 ]]; do + if [[ `echo ${DAEMONS[$i]} | grep '^[^\!]' | wc -l` -eq 1 ]]; then + /etc/rc.d/${DAEMONS[$i]} stop + fi + let i=i-1 + done + # find any leftover daemons and shut them down + if [ -d /var/run/daemons ]; then + for daemon in `ls /var/run/daemons`; do + /etc/rc.d/$daemon stop + done + fi fi if [ "$PREVLEVEL" != "N" ]; then - stat_busy "Sending SIGTERM To Processes" - /sbin/killall5 -15 &> /dev/null - /usr/bin/sleep 5 - stat_done - - stat_busy "Sending SIGKILL To Processes" - /sbin/killall5 -9 &> /dev/null - stat_done - - stat_busy "Starting DevFS Daemon" - /sbin/devfsd /dev - stat_done - - stat_busy "Starting Log Daemons" - /usr/sbin/syslogd -m 0 - /usr/sbin/klogd -c 4 - stat_done + stat_busy "Sending SIGTERM To Processes" + /sbin/killall5 -15 &> /dev/null + /usr/bin/sleep 5 + stat_done + + stat_busy "Sending SIGKILL To Processes" + /sbin/killall5 -9 &> /dev/null + stat_done + + stat_busy "Starting DevFS Daemon" + /sbin/devfsd /dev + stat_done + + stat_busy "Starting Log Daemons" + /usr/sbin/syslogd -m 0 + /usr/sbin/klogd -c 4 + stat_done fi if [ "$RUNLEVEL" = "1" ]; then - echo "Entering single-user mode..." - exec /sbin/init -t1 S + echo "Entering single-user mode..." + exec /sbin/init -t1 S fi # End of file -- cgit v1.2.3