2010-02-23 23:56:13 +01:00
|
|
|
#!/sbin/runscript
|
|
|
|
#
|
|
|
|
# Script for starting xend in dom0 kernels.
|
|
|
|
#
|
|
|
|
command=/usr/sbin/xend
|
|
|
|
pidfile=/var/run/xend.pid
|
|
|
|
|
|
|
|
depend()
|
|
|
|
{
|
|
|
|
need localmount
|
|
|
|
}
|
|
|
|
|
|
|
|
start()
|
|
|
|
{
|
2010-02-24 01:49:59 +01:00
|
|
|
if test -d /proc/xen; then
|
|
|
|
modprobe -q xen-evtchn || eend $? "Failed to load xen-evtchn module!"
|
2010-02-23 23:56:13 +01:00
|
|
|
|
2010-02-24 01:49:59 +01:00
|
|
|
if ! test -d /proc/xen/capabilities && \
|
|
|
|
! grep ' xenfs$' /proc/filesystems >/dev/null && \
|
|
|
|
! grep '^xenfs ' /proc/mounts >/dev/null; then
|
|
|
|
ebegin "Mounting xenfs for xend"
|
|
|
|
mount -t xenfs xenfs /proc/xen
|
|
|
|
eend $?
|
|
|
|
fi
|
|
|
|
ebegin "Starting xend"
|
|
|
|
${command} start
|
2010-02-23 23:56:13 +01:00
|
|
|
eend $?
|
2010-02-24 01:49:59 +01:00
|
|
|
else
|
|
|
|
eerror "xend needs dom0 support, aborting"
|
2010-02-23 23:56:13 +01:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
stop()
|
|
|
|
{
|
|
|
|
ebegin "Stopping xend"
|
|
|
|
${command} stop
|
|
|
|
eend $?
|
|
|
|
}
|