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

Re: [Xen-devel] [PATCH 2 of 5 V3] tools/hotplug: Remus network buffering setup scripts

On Thu, Oct 31, 2013 at 5:25 PM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
> This was to just make sure that the IFB variable was supplied as part
> of the environment..
> Just like the two checks on top of this script..
> "
> : ${vifname?}
> "

Do these result in useful error reporting to the end user?

It displays a message "<script name>:lineno: vifname: parameter not set or null"
on stderr.
Bearing in
mind that the end user might be using libxl but not xl and therefore not
see stdout/err (which might be going into some daemon's log file).

These parameters are supposed to be set by libxl before fork+exec-ing the script.
And their values are not obtained from the user or the command line. They are
generated inside libxl, and checked for non-null status.  So I dont think we need
to worry about libxl not being able to see the error.
Also, either I'm missing it or the bash manpage only documents
${parameter:?} and not ${parameter?}. Are both actually valid?

You are right. The man page documents only the ${parameter:?} format,
although the "${parameter?}" also seems to work for me. I will stick to the
documented format.

Xen-devel mailing list



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