WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] xencommons: modprobe xenfs if it not be loaded
From: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx>
Date: Sat, 19 Jun 2010 16:10:48 +0800
Cc:
Delivery-date: Sat, 19 Jun 2010 01:11:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C1C744F.8030903@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4C1C744F.8030903@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 3.0a1 (Windows/2008050715)
Do a small fix in order to be compatible with the old Dom0 kernel
which has no xenfs.ko.

-----------

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 b9c541d9c138 -r 96978e701b26 tools/hotplug/Linux/init.d/xencommons
--- a/tools/hotplug/Linux/init.d/xencommons     Tue Jun 15 13:27:14 2010 +0100
+++ b/tools/hotplug/Linux/init.d/xencommons     Sun Jun 20 00:11:45 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 2>/dev/null
+       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