From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] New scriptarg=... -net parameter allows passing of an argument
Date: Thu, 12 Jun 2008 16:50:17 -0500 [thread overview]
Message-ID: <48519A19.8080803@codemonkey.ws> (raw)
In-Reply-To: <4851948E.4070300@qumranet.com>
Avi Kivity wrote:
> Anthony Liguori wrote:
>> Ian Jackson wrote:
>>> Previously, network scripts would have to do all of their work based
>>> only on the script name and interface name. If the script's behaviour
>>> is supposed to be different for different network interfaces this
>>> might involve constructing a special script for each interface with
>>> the associated need to delete it etc.
>>>
>>
>> env args should get passed down to the script although I can see an
>> argument for being able to specify this in -net. My only suggestion
>> would be to use an env arg instead of "$2" as it will make it easier
>> to extend in the future.
>
> Environment variables are global, whereas scriptarg is per-interface.
> Consider the case where scriptarg denotes the bridge name we want the
> interface to attach to.
Right, what I'm suggesting is that scriptarg=... use an environmental
variable (for instance, named SCRIPTARG) when executing the actual
script instead of passing it as the second parameter.
It's nicer IMHO because it extends well to passing more data to the
script (like whatever the -name parameter is).
I was originally going to suggest arbitrary ,key=value be passed by
default as environmental variables like QEMU_key=value but I think that
would get too complicated given the current code.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2008-06-12 21:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-12 17:25 [Qemu-devel] [PATCH] New scriptarg=... -net parameter allows passing of an argument Ian Jackson
2008-06-12 18:39 ` Anthony Liguori
2008-06-12 21:26 ` Avi Kivity
2008-06-12 21:50 ` Anthony Liguori [this message]
2008-06-12 22:04 ` Avi Kivity
2008-06-13 9:20 ` Ian Jackson
2008-06-13 11:10 ` [Qemu-devel] [PATCH] Pass all parameters to -net tap, ... as env vars to if script Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48519A19.8080803@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.