From: Richie <listmail@triad.rr.com>
To: Xen Devel <xen-devel@lists.xensource.com>
Subject: [PATCH] xend: update init script to avoid grep on non-existent file system
Date: Sat, 15 May 2010 00:16:08 -0400 [thread overview]
Message-ID: <4BEE2008.7020808@triad.rr.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 321 bytes --]
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.
[-- Attachment #2: xend.patch --]
[-- Type: text/x-patch, Size: 673 bytes --]
# HG changeset patch
# User Richie <listmail@triad.rr.com>
# Date 1273894781 14400
# Node ID 90705b2abd84e75971d12dead966191731ab1361
# Parent baccadfd9418b8dee931945e5752cb118f5bf3cb
xend: update init script to avoid grep on non-existent file system
diff -r baccadfd9418 -r 90705b2abd84 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 Fri May 14 23:39:41 2010 -0400
@@ -31,7 +31,8 @@
mount -t xenfs xenfs /proc/xen
fi
-if ! grep -q "control_d" /proc/xen/capabilities ; then
+if ! test -d /proc/xen || \
+ ! grep -q "control_d" /proc/xen/capabilities ; then
exit 0
fi
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2010-05-15 4:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-15 4:16 Richie [this message]
2010-05-15 7:35 ` [PATCH] xend: update init script to avoid grep on non-existent file system Keir Fraser
2010-05-15 14:56 ` Richie
2010-05-15 15:11 ` Keir Fraser
2010-05-15 16:00 ` Richie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BEE2008.7020808@triad.rr.com \
--to=listmail@triad.rr.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).