[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] xencommons: modprobe xenfs if it not be loaded



If xenfs is compiled as a module, now cannot complete
'service xencommons start', modprobe xenfs can fix it.

Signed-off-by: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx>

diff -r 659e4b69d26b -r f6b44890c298 tools/hotplug/Linux/init.d/xencommons
--- a/tools/hotplug/Linux/init.d/xencommons     Sat Jun 19 22:24:09 2010 +0800
+++ b/tools/hotplug/Linux/init.d/xencommons     Sat Jun 19 23:43:10 2010 +0800
@@ -24,16 +24,21 @@
 XENCONSOLED_PIDFILE=/var/run/xenconsoled.pid
 shopt -s extglob
 
-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
+if test "x$1" = xstart; then
+       if ! grep '     xenfs$' /proc/filesystems >/dev/null; then
+               test -x /sbin/modprobe && /sbin/modprobe xenfs
+       fi
+       if 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
 fi
 
-if ! grep -q "control_d" /proc/xen/capabilities ; then
+if ! test -e /proc/xen/capabilities || \
+    ! grep -q "control_d" /proc/xen/capabilities ; then
        exit 0
 fi
 


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.