From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: [PATCH] xencommons: modprobe xenfs if it not be loaded Date: Mon, 21 Jun 2010 10:46:01 +0100 Message-ID: <4C1F34D9.4000006@goop.org> References: <4C1C744F.8030903@cn.fujitsu.com> <4C1C7B88.1000907@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4C1C7B88.1000907@cn.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Yu Zhiguo Cc: "xen-devel@lists.xensource.com" , Keir Fraser List-Id: xen-devel@lists.xenproject.org On 06/19/2010 09:10 AM, Yu Zhiguo wrote: > 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. > It should just be sufficient to explicitly mount /proc/xen, which will trigger a modprobe if necessary. J > Signed-off-by: Yu Zhiguo > > 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@lists.xensource.com > http://lists.xensource.com/xen-devel > >