void-packages/srcpkgs/xen/files/xend.rc
Juan RP 9c7a8e7209 xen: only start xend in dom0 kernels.
--HG--
extra : convert_revision : 7a32ad68f42a0734920f3facabd845938e2a85ab
2010-02-24 01:49:59 +01:00

38 lines
675 B
Text

#!/sbin/runscript
#
# Script for starting xend in dom0 kernels.
#
command=/usr/sbin/xend
pidfile=/var/run/xend.pid
depend()
{
need localmount
}
start()
{
if test -d /proc/xen; then
modprobe -q xen-evtchn || eend $? "Failed to load xen-evtchn module!"
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
eend $?
else
eerror "xend needs dom0 support, aborting"
fi
}
stop()
{
ebegin "Stopping xend"
${command} stop
eend $?
}