|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v1 12/12] hotplug/Linux: add iscsi block hotplug script
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.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |