3 # xenstored Script to start and stop qemu for xen dom0 disk backend
5 # chkconfig: 2345 70 10
6 # description: Starts and stops qemu for xen dom0 disk backend
9 # Source function library
10 . /etc/rc.d/init.d/functions
14 [ -d /proc/xen ] || exit 0
15 grep -qs "control_d" /proc/xen/capabilities || exit 0
16 [ -x /usr/bin/qemu-system-i386 ] || exit 0
18 if [ -f /var/lock/subsys/xen-qemu-dom0-disk-backend ]; then
19 msg_already_running "qemu for xen dom0 disk backend"
23 msg_starting "qemu for xen dom0 disk backend"
24 daemon /usr/bin/qemu-system-i386 -xen-domid 0 \
25 -xen-attach -name dom0 -nographic -M xenpv -daemonize \
26 -monitor /dev/null -serial /dev/null -parallel /dev/null \
27 -pidfile /var/run/qemu-dom0.pid
30 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/xen-qemu-dom0-disk-backend
34 if [ ! -f /var/lock/subsys/xen-qemu-dom0-disk-backend ]; then
35 msg_not_running "qemu for xen dom0 disk backend"
38 msg_stopping "qemu for xen dom0 disk backend"
39 killproc --pidfile /var/run/qemu-dom0.pid qemu-system-i386
41 rm -f /var/run/qemu-dom0.pid >/dev/null 2>&1
42 rm -f /var/lock/subsys/xen-qemu-dom0-disk-backend >/dev/null 2>&1
46 # See how we were called.
52 status --pidfile /var/run/qemu-dom0.pid xen-qemu-dom0-disk-backend qemu-system-i386
62 msg_usage "$0 {start|stop|status|restart|force-reload}"