From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yu Zhiguo Subject: [PATCH] xencommons: modprobe xenfs if it not be loaded Date: Sat, 19 Jun 2010 15:39:59 +0800 Message-ID: <4C1C744F.8030903@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org If xenfs is compiled as a module, now cannot complete 'service xencommons start', modprobe xenfs can fix it. Signed-off-by: Yu Zhiguo 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