aboutsummaryrefslogtreecommitdiffstats
path: root/tools/hotplug
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-09-09 15:32:30 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-09-09 15:32:30 +0100
commit7c211e235058eec635104721cc01b6f89b1c4d70 (patch)
tree089bc7a3eb6247bbc63bac853f5bcdfc31a2f464 /tools/hotplug
parenta0eb214b31ae2b7d2c99c928e888c6586b24a058 (diff)
downloadxen-7c211e235058eec635104721cc01b6f89b1c4d70.tar.gz
xen-7c211e235058eec635104721cc01b6f89b1c4d70.tar.bz2
xen-7c211e235058eec635104721cc01b6f89b1c4d70.zip
mount /proc/xen in init.d/xen
pvops dom0 kernels have a separate xenfs which has to be mounted on /proc/xen. Systems with older configurations don't have xenfs listed in fstab, and it can sometimes make sense to keep it that way (for example, if the dom0 wants to boot a native-only kernel too). The attached patch to the script which ends up in /etc/init.t/xend mounts /proc/xen if it appears to be necessary. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/hotplug')
-rwxr-xr-xtools/hotplug/Linux/init.d/xend9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/hotplug/Linux/init.d/xend b/tools/hotplug/Linux/init.d/xend
index 3230f864db..90c2beabf9 100755
--- a/tools/hotplug/Linux/init.d/xend
+++ b/tools/hotplug/Linux/init.d/xend
@@ -22,6 +22,15 @@
shopt -s extglob
test -f /etc/sysconfig/xend && . /etc/sysconfig/xend
+if test "x$1" = xstart && \
+ test -d /proc/xen && \
+ ! test -d /proc/xen/capabilities && \
+ grep ' xenfs$' /proc/filesystems >/dev/null && \
+ ! grep '^xenfs ' /proc/mounts >/dev/null;
+then
+ mount -t xenfs xenfs /proc/xen
+fi
+
if ! grep -q "control_d" /proc/xen/capabilities ; then
exit 0
fi