- moved all dns related functionality to the plc.d/dns file
[myplc.git] / plc.d / syslog
1 #!/bin/bash
2 #
3 # priority: 200
4 #
5 # Do not use the standard syslog initscript. It will start up a
6 # (probably duplicate) copy of klogd, and on shutdown, if a pidfile is
7 # not found, will (probably) kill the host syslogd and klogd instances
8 # as well.
9 #
10 # Mark Huang <mlhuang@cs.princeton.edu>
11 # Copyright (C) 2006 The Trustees of Princeton University
12 #
13 # $Id$
14 #
15
16 # Source function library and configuration
17 . /etc/plc.d/functions
18 . /etc/planetlab/plc_config
19
20 # Be verbose
21 set -x
22
23 case "$1" in
24     start)
25         MESSAGE=$"Starting system logger"
26         dialog "$MESSAGE"
27
28         plc_daemon syslogd -m 0
29         check
30
31         result "$MESSAGE"
32         ;;
33
34     stop)
35         MESSAGE=$"Shutting down system logger"
36         dialog "$MESSAGE"
37
38         killproc plc_syslogd
39         check
40
41         result "$MESSAGE"
42         ;;
43 esac
44
45 exit $ERRORS