Skip to contentSkip to conversation

mount /proc/xen in init.d/xen

PATCH New Ian Jackson 1 participant 1 message Sep 8, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

tools/hotplug/Linux/init.d/xend +9 -0
diff -r 18cd7c378c48 tools/hotplug/Linux/init.d/xend
@@ -21,6 +21,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