3 # xenconsoled Script to start and stop xenconsoled
5 # chkconfig: 2345 70 10
6 # description: Starts and stops xenconsoled
8 # Provides: xenconsoled
9 # Required-Start: $syslog $remote_fs
11 # Required-Stop: $syslog $remote_fs
13 # Default-Start: 2 3 4 5
15 # Short-Description: Start/stop xenconsoled
16 # Description: Starts and stops the daemons neeeded for xl/xend
19 # Source function library.
20 . /etc/rc.d/init.d/functions
22 # Read in configuration options.
25 XENCONSOLED_LOG_DIR=/var/log/xen/console
26 [ -f /etc/sysconfig/xenconsoled ] && . /etc/sysconfig/xenconsoled
28 if [ "$1" = "start" -a -d /proc/xen -a ! -f /proc/xen/capabilities ] && \
29 ! grep -qs '^xenfs ' /proc/mounts >/dev/null; then
30 mount -t xenfs xenfs /proc/xen
33 grep -qs "control_d" /proc/xen/capabilities || exit 0
36 if [ -f /var/lock/subsys/xenconsoled ]; then
37 msg_already_running xenconsoled
40 msg_starting xenconsoled
41 daemon /usr/sbin/xenconsoled --pid-file=/var/run/xenconsoled.pid --log=${XENCONSOLED_LOG} --log-dir=${XENCONSOLED_LOG_DIR} $XENCONSOLED_ARGS
43 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/xenconsoled
47 if [ ! -f /var/lock/subsys/xenconsoled ]; then
48 msg_not_running xenconsoled
51 msg_stopping xenconsoled
52 killproc --pidfile /var/run/xenconsoled.pid xenconsoled
54 rm -f /var/run/xenconsoled.pid >/dev/null 2>&1
55 rm -f /var/lock/subsys/xenconsoled >/dev/null 2>&1
59 # See how we were called.
75 msg_usage "$0 {start|stop|status|restart|force-reload}"