[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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 <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
>
>   


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.