From: Ian Jackson Subject: [PATCH] mount /proc/xen in init.d/xen Date: Tue, 8 Sep 2009 16:07:55 +0100 Message-ID: <19110.29515.654411.24338@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org pvops dom0 kernels have a separate xenfs which has to be mounted on /proc/xen. Systems with older configurations don't have xenfs listed in fstab, and it can sometimes make sense to keep it that way (for example, if the dom0 wants to boot a native-only kernel too). The attached patch to the script which ends up in /etc/init.t/xend mounts /proc/xen if it appears to be necessary. Signed-off-by: Ian Jackson diff -r 18cd7c378c48 tools/hotplug/Linux/init.d/xend --- a/tools/hotplug/Linux/init.d/xend Mon Sep 07 14:26:06 2009 +0100 +++ b/tools/hotplug/Linux/init.d/xend Tue Sep 08 16:06:15 2009 +0100 @@ -21,6 +21,15 @@ shopt -s extglob test -f /etc/sysconfig/xend && . /etc/sysconfig/xend + +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 +fi if ! grep -q "control_d" /proc/xen/capabilities ; then exit 0