[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 3/4] libxl: call hotplug scripts from libxl for vbd

Ian Jackson escribiÃ:
Ian Campbell writes ("Re: [Xen-devel] [PATCH v4 3/4] libxl: call hotplug scripts 
from libxl for vbd"):
On Mon, 2012-05-14 at 13:38 +0100, Roger Pau Monne wrote:
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.

In fact Roger was right on the narrow point: because the>/dev/null is
inside the backticks, the backticks never see any output and it's
equivalent to `false` or `true`.  I'm pleased that it's not just me
that read it the way you did at first :-).

The fact that it works is just a question of "luck", but the construction is definitely wrong. I always forget that you don't need to use the ` when testing in the conditional for the execution of a command. Sorry about that.

But you are of course right in that it's a silly construction.  If the
output is not wanted, `` should not be used.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.