xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Roger Pau Monne <roger.pau@citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v4 3/4] libxl: call hotplug scripts from libxl for vbd
Date: Mon, 14 May 2012 14:30:04 +0100	[thread overview]
Message-ID: <4FB108DC.3040804@citrix.com> (raw)
In-Reply-To: <1336999913.31817.69.camel@zakaz.uk.xensource.com>

Ian Campbell escribió:
> On Mon, 2012-05-14 at 13:38 +0100, Roger Pau Monne wrote:
>>>> +# Hack to prevent the execution of hotplug scripts from udev if the domain
>>>> +# has been launched from libxl
>>>> +if [ -n "${UDEV_CALL}" ]&&   \
>>>> +   `xenstore-read "libxl/disable_udev">/dev/null 2>&1`; then
>>> This reads something from xenstore and executes it as a shell command!
>>> (Also it will go wrong if the value read is empty eg becaue the key
>>> doesn't exist.)
>> Are you sure about this? This command never returns anything, because it
>> is redirected to /dev/null, so we only evaluate if it is able to read
>> libxl/disable_udev. If libxl/disable_udev exists this test is passed.
>
> You don't need the backticks for that though. With the backticks it will
> execute whatever happens to be in the key -- I guess it's something
> quite benign right now or you'd have seen errors.

Yes, it's not the first time that I've made that mistake. Since it never 
returns anything I guess that's why I never saw any errors.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2012-05-14 13:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-10 11:28 [PATCH v4 0/4] libxl: call hotplug scripts from libxl Roger Pau Monne
2012-05-10 11:28 ` [PATCH v4 1/4] libxl: pass env vars to libxl__exec Roger Pau Monne
2012-05-10 16:03   ` Ian Jackson
2012-05-10 11:28 ` [PATCH v4 2/4] libxl: add libxl__xs_path_cleanup Roger Pau Monne
2012-05-10 16:05   ` Ian Jackson
2012-05-10 11:28 ` [PATCH v4 3/4] libxl: call hotplug scripts from libxl for vbd Roger Pau Monne
2012-05-10 16:30   ` Ian Jackson
2012-05-14 12:38     ` Roger Pau Monne
2012-05-14 12:51       ` Ian Campbell
2012-05-14 13:30         ` Roger Pau Monne [this message]
2012-05-14 14:14         ` Ian Jackson
2012-05-14 14:20           ` Roger Pau Monne
2012-05-14 14:12       ` Ian Jackson
2012-05-10 11:28 ` [PATCH v4 4/4] libxl: call hotplug scripts from libxl for vif Roger Pau Monne

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=4FB108DC.3040804@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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).