From: Ian Jackson Subject: Re: [PATCH v1 12/12] hotplug/Linux: add iscsi block hotplug script Date: Fri, 15 Mar 2013 12:24:31 +0000 Message-ID: <20803.4863.413666.376248@mariner.uk.xensource.com> References: <1358963317-10221-1-git-send-email-roger.pau@citrix.com> <1358963317-10221-13-git-send-email-roger.pau@citrix.com> <20800.43492.41548.634968@mariner.uk.xensource.com> <51430F3B.8060300@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <51430F3B.8060300@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: Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Roger Pau Monne writes ("Re: [Xen-devel] [PATCH v1 12/12] hotplug/Linux: add iscsi block hotplug script"): > On 13/03/13 17:31, Ian Jackson wrote: > > Would it be possible for the user to specify the file that the > > password should be read from ? > > AFAIK no, this is read from a system defined file, that can be different > depending on the distro used. Maybe be could expand this script latter > if needed, in order to be able to detect where this file resides and use > that instead of passing the user/password in the command line. Right, fair enough. > > Did you write this script from scratch ? (TBH I don't intend to > > review it in detail...) > > I've found a previous version of iSCSI and Xen here: > > http://backdrift.org/xen-block-iscsi-script-with-multipath-support > > but I didn't use it, so yes. Right. > > Why no set -e ? > > Because some of the executed commands might fail, but that's expected > (and shouldn't abort the execution) and we manually check for the return > value of executed commands. I would normally turn on set -e, and then deal explicitly with the commands that are expected to fail, with patterns like set +e command that might fail rc=$? set -e or command we don't care about ||: or if command then ... That avoids accidentally missing out error checking. Ian.