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 / boot.klog < prev    next >
Text File  |  2006-02-16  |  2KB  |  70 lines

  1. #! /bin/sh
  2. #
  3. # Copyright (c) 2002 SuSE Linux AG, Nuernberg, Germany. All rights reserved.
  4. #
  5. # /etc/init.d/boot.klog
  6. #
  7. ### BEGIN INIT INFO
  8. # Provides:          boot.klog
  9. # Required-Start:    boot.localfs
  10. # Required-Stop:
  11. # Default-Start:     B
  12. # Default-Stop:
  13. # Description:       dump kernel messages
  14. ### END INIT INFO
  15.  
  16. . /etc/rc.status
  17. . /etc/sysconfig/boot
  18.  
  19. rc_reset
  20.  
  21. case "$1" in
  22.   start)
  23.     # Read all kernel messages generated until now and put them in one file.
  24.     test -s /var/log/boot.msg && mv -f /var/log/boot.msg /var/log/boot.omsg
  25.     if test -x /sbin/klogd ; then
  26.     echo Creating /var/log/boot.msg
  27.     /sbin/klogd -s -o -n -f /var/log/boot.msg
  28.     /bin/sync
  29.     test -s /var/log/boot.msg
  30.     rc_status -v1 -r
  31.     elif test -x /bin/dmesg ; then
  32.     echo Creating /var/log/boot.msg
  33.     /bin/dmesg > /var/log/boot.msg
  34.     /bin/sync
  35.     test -s /var/log/boot.msg
  36.     rc_status -v1 -r
  37.     fi
  38.     if test -x /usr/sbin/klogconsole ; then
  39.     if test -x /sbin/showconsole ; then
  40.         if test "`/sbin/showconsole`" = /dev/tty1 ; then
  41.             ( test -c /dev/tty10 && > /dev/tty10 ) > /dev/null 2>&1 \
  42.             && /usr/sbin/klogconsole $KLOGCONSOLE_PARAMS -r10 
  43.         else
  44.             /usr/sbin/klogconsole $KLOGCONSOLE_PARAMS -r 0
  45.         fi
  46.     fi
  47.     elif test -x /bin/dmesg ; then
  48.     /bin/dmesg -n 7
  49.     fi
  50.     #
  51.     # Say blogd that I/O is possible now
  52.     #
  53.     test -x /sbin/blogd && killproc -IO /sbin/blogd
  54.    ;;
  55.   stop|restart)
  56.     # skip / nothing to do
  57.     ;;
  58.   status)
  59.     rc_failed 4
  60.     rc_status -v
  61.     ;;
  62.   *)
  63.     echo "Usage: $0 {start|stop|status|restart}"
  64.     exit 1
  65.     ;;
  66. esac
  67.  
  68. rc_exit
  69.  
  70.