Add additional parameter to network configuration callback script calls in launch_script(). External script can provide any exotic network configuration for VM instance based on qemu_name as new param.
It's convenient to have only one ifup script without tricks with symlinks to it for each VM instance on large VDS hosts. Signed-off-by: Anton Worshevsky <g...@gbdj.ru> --- net/tap.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/net/tap.c b/net/tap.c index 6abb962..64a31fe 100644 --- a/net/tap.c +++ b/net/tap.c @@ -421,6 +421,9 @@ static void launch_script(const char *setup_script, const char *ifname, parg = args; *parg++ = (char *)setup_script; *parg++ = (char *)ifname; + if (qemu_name) { + *parg++ = (char *)qemu_name; + } *parg = NULL; execv(setup_script, args); _exit(1); -- 1.7.4.4