xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xencommons: modprobe xenfs if it not be loaded
@ 2010-06-19  7:39 Yu Zhiguo
  2010-06-19  8:10 ` Yu Zhiguo
  0 siblings, 1 reply; 12+ messages in thread
From: Yu Zhiguo @ 2010-06-19  7:39 UTC (permalink / raw)
  To: Keir Fraser, xen-devel@lists.xensource.com

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

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-06-22 13:47 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-19  7:39 [PATCH] xencommons: modprobe xenfs if it not be loaded Yu Zhiguo
2010-06-19  8:10 ` Yu Zhiguo
2010-06-21  9:46   ` Jeremy Fitzhardinge
2010-06-21 14:05     ` Ian Jackson
2010-06-21 14:45       ` Jeremy Fitzhardinge
2010-06-21 16:31         ` Ian Jackson
2010-06-21 17:29         ` Keir Fraser
2010-06-21 17:28       ` Keir Fraser
2010-06-21 20:13         ` Jeremy Fitzhardinge
2010-06-21 20:33           ` Keir Fraser
2010-06-22  1:18     ` [PATCH] xencommons: mount xenfs directly if xenfs " Yu Zhiguo
2010-06-22 13:47       ` Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).