home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
boot
/
i386
/
rescue
/
etc
/
init.d
/
boot.klog
< prev
next >
Wrap
Text File
|
2006-11-29
|
2KB
|
73 lines
#! /bin/sh
#
# Copyright (c) 2002 SuSE Linux AG, Nuernberg, Germany. All rights reserved.
#
# /etc/init.d/boot.klog
#
### BEGIN INIT INFO
# Provides: boot.klog
# Required-Start: boot.rootfsck
# Should-Start: $local_fs
# Default-Start: B
# Default-Stop:
# Description: dump kernel messages
### END INIT INFO
. /etc/rc.status
. /etc/sysconfig/boot
rc_reset
case "$1" in
start)
# Read all kernel messages generated until now and put them in one file.
test -s /var/log/boot.msg && mv -f /var/log/boot.msg /var/log/boot.omsg
echo Creating /var/log/boot.msg
if test -x /sbin/klogd ; then
/sbin/klogd -s -o -n -f /var/log/boot.msg
/bin/sync
test -s /var/log/boot.msg
rc_status -v1 -r
elif test -x /bin/dmesg ; then
/bin/dmesg > /var/log/boot.msg
/bin/sync
test -s /var/log/boot.msg
rc_status -v1 -r
fi
if test -e /dev/shm/initrd.msg ; then
cat /dev/shm/initrd.msg >> /var/log/boot.msg
rm -f /dev/shm/initrd.msg
fi
if test -x /usr/sbin/klogconsole ; then
if test -x /sbin/showconsole ; then
if test "`/sbin/showconsole`" = /dev/tty1 ; then
( test -c /dev/tty10 && > /dev/tty10 ) > /dev/null 2>&1 \
&& /usr/sbin/klogconsole $KLOGCONSOLE_PARAMS -r10
else
/usr/sbin/klogconsole $KLOGCONSOLE_PARAMS -r 0
fi
fi
elif test -x /bin/dmesg ; then
/bin/dmesg -n 7
fi
#
# Say blogd that I/O is possible now
#
test -x /sbin/blogd && killproc -IO /sbin/blogd
;;
stop|restart)
# skip / nothing to do
;;
status)
rc_failed 4
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
;;
esac
rc_exit