All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yu Zhiguo <yuzg@cn.fujitsu.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: [PATCH] xencommons: modprobe xenfs if it not be loaded
Date: Sat, 19 Jun 2010 15:39:59 +0800	[thread overview]
Message-ID: <4C1C744F.8030903@cn.fujitsu.com> (raw)

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

             reply	other threads:[~2010-06-19  7:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-19  7:39 Yu Zhiguo [this message]
2010-06-19  8:10 ` [PATCH] xencommons: modprobe xenfs if it not be loaded 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C1C744F.8030903@cn.fujitsu.com \
    --to=yuzg@cn.fujitsu.com \
    --cc=keir.fraser@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.