3 # xenconsoled Script to start and stop xenconsoled
5 # chkconfig: 2345 70 10
6 # description: Starts and stops xenconsoled
9 # Source function library.
10 . /etc/rc.d/init.d/functions
12 # Read in configuration options.
15 XENCONSOLED_LOG_DIR=/var/log/xen/console
16 [ -f /etc/sysconfig/xenconsoled ] && . /etc/sysconfig/xenconsoled
18 if [ "$1" = "start" -a -d /proc/xen -a ! -f /proc/xen/capabilities ] && \
19 ! grep -qs '^xenfs ' /proc/mounts >/dev/null; then
20 mount -t xenfs xenfs /proc/xen
23 grep -qs "control_d" /proc/xen/capabilities || exit 0
26 if [ -f /var/lock/subsys/xenconsoled ]; then
27 msg_already_running xenconsoled
30 msg_starting xenconsoled
31 daemon /usr/sbin/xenconsoled --pid-file=/var/run/xenconsoled.pid --log=${XENCONSOLED_LOG} --log-dir=${XENCONSOLED_LOG_DIR} $XENCONSOLED_ARGS
33 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/xenconsoled
37 if [ ! -f /var/lock/subsys/xenconsoled ]; then
38 msg_not_running xenconsoled
41 msg_stopping xenconsoled
42 killproc --pidfile /var/run/xenconsoled.pid xenconsoled
44 rm -f /var/run/xenconsoled.pid >/dev/null 2>&1
45 rm -f /var/lock/subsys/xenconsoled >/dev/null 2>&1
49 # See how we were called.
65 msg_usage "$0 {start|stop|status|restart|force-reload}"