removed lfs-commands
[linux_from_scratch.git] / bootscripts / contrib / new-boot-0.2 / sbin / init.d / runlevel.2 / logging
blob584649f1455e004c6885284c2bac9c5d6155f67f
1 #!/bin/sh
2 #
3 # start system and kernel logging
6 #locate and source functions script
7 source `PATH=$INIT_D/:/sbin/init.d:/etc/init.d:/etc/rc.d type -p functions`
9 case "$1" in
10 start)
11 need $mounted_filesystems || exit_if_any_error
13 #logging will work without the hostname being set but the logs will
14 #not contain, the hostname with the messages.
15 #Therefore we need hostname_available but do not exit_if_any_error
16 need $hostname_available
18 if [ ! -d /var/log ]; then
19 echo -n 'No /var/log directory => logging daemons not started!'
20 print_status skipped
21 exit 2
22 fi
24 echo 'Starting system log daemon...'
25 loadproc syslogd -m 0 || exit_if_any_error
27 echo 'Starting kernel log daemon...'
28 loadproc klogd || exit_if_any_error
30 stop)
31 echo 'Stopping kernel log daemon...'
32 killproc klogd
34 echo 'Stopping system log daemon...'
35 killproc syslogd
37 reload)
38 echo 'Telling klogd to reload symbols...'
39 reloadproc klogd SIGUSR1
41 echo 'Reinitializing system log daemon...'
42 reloadproc syslogd
44 status)
45 statusproc klogd
46 statusproc syslogd
47 ;;
49 exit 1
51 esac
53 exit 0