ACC SHELL

Path : /etc/init.d/
File Upload :
Current File : //etc/init.d/single

#! /bin/sh
# Copyright (c) 1996-2002 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
#
# Author: Florian La Roche, 1996
#	  Werner Fink <werner@suse.de>, 1996,98,2000
#	  Burchard Steinbild, 1996
#
# Please send feedback to http://www.suse.de/feedback
#
# /etc/init.d/single
#

. /etc/rc.status

#
# Avoid being interrupted by child or keyboard
#
trap "echo" SIGINT SIGSEGV SIGQUIT SIGTERM
set +e

rc_reset
case "$1" in
    start)
	if test -n "$KBD_RATE" -a -n "$KBD_DELAY" -a -x /sbin/kbdrate; then
	    echo Setting keyboard repeat rate and delay time
	    /sbin/kbdrate -r $KBD_RATE -d $KBD_DELAY
	    rc_status -v1
	fi
	echo "Sending all processes the TERM signal..."
	killall5 -15
	echo -e "$rc_done_up"

	# Wait between last SIGTERM and the next SIGKILL
	rc_wait /sbin/blogd /sbin/splash

	echo "Sending all processes the KILL signal..."
	killall5 -9
	echo -e "$rc_done_up"

	if test -n "$REDIRECT" && /sbin/checkproc /sbin/blogd ; then
    	    # redirect our famous last messages to default console
    	    exec 0<> $REDIRECT 1>&0 2>&0
	fi

	#
	# If we're not in single user mode we should go down there.
	#
	if test -n "$RUNLEVEL" -a "$RUNLEVEL" != "S" ; then
	    exec init S
	fi
	;;
    stop)
	case `uname -r` in
            0.*|1.*|2.[01].*|2.2.?|2.2.10)
		echo -n "Running update (bdflush) daemon"
		/sbin/update
		rc_status -v1
		;;
	esac
	;;
    *)
	echo "Usage: $0 {start|stop}"
	exit 1
	;;
esac
rc_exit

ACC SHELL 2018