From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richie Subject: Re: [PATCH] xend: update init script to avoid grep on non-existent file system Date: Sat, 15 May 2010 12:00:37 -0400 Message-ID: <4BEEC525.6040405@triad.rr.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030104020202000104040507" Return-path: In-Reply-To: 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 Cc: Xen Devel List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------030104020202000104040507 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Keir Fraser wrote: > On 15/05/2010 05:16, "Richie" wrote: > > >> I'm seeing a grep error during bare metal pvops kernel boot. In the >> init script, the previous checks will avoid/perform the /proc/xen mount >> as appropriate, but then it does a grep on /proc/xen/capabilities >> without ensuring that /proc/xen is actually mounted. This is my attempt >> (read: first patch :) ) to avoid it. >> > > Richie, > > Can you try adding the -s option to grep instead (i.e., grep -qs)? Should be > a simpler way to achieve the same thing. I'll apply that instead if it works > okay for you. > > -- Keir > > > --------------030104020202000104040507 Content-Type: text/x-patch; name="xend_v2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="xend_v2.patch" # HG changeset patch # User Richie # Date 1273938512 14400 # Node ID cc3ed74cfef3f4504712d1d53c0af8c8940e9ab8 # Parent baccadfd9418b8dee931945e5752cb118f5bf3cb xend: suppress errors during capabilities check diff -r baccadfd9418 -r cc3ed74cfef3 tools/hotplug/Linux/init.d/xend --- a/tools/hotplug/Linux/init.d/xend Fri May 14 08:05:05 2010 +0100 +++ b/tools/hotplug/Linux/init.d/xend Sat May 15 11:48:32 2010 -0400 @@ -31,7 +31,7 @@ mount -t xenfs xenfs /proc/xen fi -if ! grep -q "control_d" /proc/xen/capabilities ; then +if ! grep -qs "control_d" /proc/xen/capabilities ; then exit 0 fi --------------030104020202000104040507 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------030104020202000104040507--