From: Ian Jackson Subject: Re: [PATCH v4 3/4] libxl: call hotplug scripts from libxl for vbd Date: Mon, 14 May 2012 15:12:52 +0100 Message-ID: <20401.4836.571277.912615@mariner.uk.xensource.com> References: <1336649312-11198-1-git-send-email-roger.pau@citrix.com> <1336649312-11198-4-git-send-email-roger.pau@citrix.com> <20395.60719.885071.452187@mariner.uk.xensource.com> <4FB0FCBE.1020802@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4FB0FCBE.1020802@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roger Pau Monne Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Roger Pau Monne writes ("Re: [Xen-devel] [PATCH v4 3/4] libxl: call hotplug= scripts from libxl for vbd"): > Ian Jackson escribi=F3: > > Wouldn't it be better to have an env var set by libxl to mean "_not_ > > called from udev?". That would mean that if the udev rules weren't > > updated for some reason it would all still work. On many setups these > > are config files which may require the user to merge changes, etc., so > > this is a real concern. > = > Since the 4.2 release already implies updating udev rules (due to the = > change from tap* to *emu), I think it's better to set the var on udev, = > that way when udev is dropped we won't need to perform any change to libx= l. Ah. (The change to libxl is not an essential one so we won't "need" to make it, but OK.) > >> +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. Uh, so it does. Why are you using `` at all then ? This is a very odd construction. Thanks, Ian.