[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xend: update init script to avoid grep on non-existent file system
Sure. I agree much simpler, but is this blurb in the grep manpage a concern? -s, --no-messages Suppress error messages about nonexistent or unreadable files. Portability note: unlike GNU grep, 7th Edition Unix grep did not conform to POSIX, because it lacked -q and its -s option behaved like GNU grep’s -q option. USG-style grep also lacked -q but its -s option behaved like GNU grep. *Portable shell scripts should avoid both -q and -s and should redirect standard and error output to /dev/null instead*. (-s is specified by POSIX.)I'm not sure where all the xend daemon can run? is it always running on linux, thus implying (modern?) GNU grep? The reason I am bringing this up is that I recall having grep related issues when running git on Solaris (without gnu utilities installed) for this very reason. I will re-sumbit accordingly. Keir Fraser wrote: On 15/05/2010 05:16, "Richie" <listmail@xxxxxxxxxxxx> 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 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |