home *** CD-ROM | disk | FTP | other *** search
/ chilidog.highland.cc.ks.us / chilidog.highland.cc.ks.us.zip / chilidog.highland.cc.ks.us / backup / bradford.20120521.etc.tar.gz / bradford.20120521.etc.tar / etc / init.d / single < prev    next >
Text File  |  2003-09-01  |  1KB  |  58 lines

  1. #! /bin/sh
  2. # Copyright (c) 1996-2002 SuSE Linux AG, Nuernberg, Germany.
  3. # All rights reserved.
  4. #
  5. # Author: Florian La Roche, 1996
  6. #      Werner Fink <werner@suse.de>, 1996,98,2000
  7. #      Burchard Steinbild, 1996
  8. #
  9. # Please send feedback to http://www.suse.de/feedback
  10. #
  11. # /etc/init.d/single
  12. #
  13.  
  14. . /etc/rc.status
  15.  
  16. #
  17. # Avoid being interrupted by child or keyboard
  18. #
  19. trap "echo" SIGINT SIGSEGV SIGQUIT SIGTERM
  20. set +e
  21.  
  22. rc_reset
  23. case "$1" in
  24.     start)
  25.     if test -n "$KBD_RATE" -a -n "$KBD_DELAY" -a -x /sbin/kbdrate; then
  26.         echo Setting keyboard repeat rate and delay time
  27.         /sbin/kbdrate -r $KBD_RATE -d $KBD_DELAY
  28.         rc_status -v1
  29.     fi
  30.     echo "Sending all processes the TERM signal..."
  31.     killall5 -15
  32.     echo -e "$rc_done_up"
  33.     sleep 3
  34.     echo "Sending all processes the KILL signal..."
  35.     killall5 -9
  36.     echo -e "$rc_done_up"
  37.     #
  38.     # If we're not in single user mode we should go down there.
  39.     #
  40.     if test -n "$RUNLEVEL" -a "$RUNLEVEL" != "S" ; then
  41.         exec init S
  42.     fi
  43.     ;;
  44.     stop)
  45.     case `uname -r` in
  46.             0.*|1.*|2.[01].*|2.2.?|2.2.10)
  47.         echo -n "Running update (bdflush) daemon"
  48.         /sbin/update
  49.         rc_status -v1
  50.         ;;
  51.     esac
  52.     ;;
  53.     *)
  54.     echo "Usage: $0 {start|stop}"
  55.     exit 1
  56. esac
  57. rc_exit
  58.