diff --git a/srcpkgs/xen/files/xend.rc b/srcpkgs/xen/files/xend.rc index 157af0ce0b..5c18b0b089 100644 --- a/srcpkgs/xen/files/xend.rc +++ b/srcpkgs/xen/files/xend.rc @@ -12,18 +12,22 @@ depend() start() { - modprobe -q xen-evtchn || eend $? "Failed to load xen-evtchn module!" + if test -d /proc/xen; then + modprobe -q xen-evtchn || eend $? "Failed to load xen-evtchn module!" - if test -d /proc/xen && ! 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 + 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 - ebegin "Starting xend" - ${command} start - eend $? } stop()