[Devel] Add veid argument to vznetcfg
Igor Sukhih
igor at sw.ru
Fri Oct 6 05:45:40 PDT 2006
Kristian F. HЬgh wrote:
> Hi list,
>
> As I need the VEID number when bringing up veth interface,
> I changed init to VEID.
> (I have a vlan and bridge for each VE)
>
> vznetcfg init veth <dev>
> vznetcfg <veid> veth <dev>
>
> Best regards,
> Kristian HЬgh
> Segtel A/S
>
> ------------------------------------------------------------------------
>
> --- a/src/lib/veth.c 2006-10-06 13:09:00.268275416 +0200
> +++ b/src/lib/veth.c 2006-10-06 13:10:50.765528528 +0200
> @@ -93,7 +92,9 @@
> static int run_vznetcfg(envid_t veid, veth_dev *dev)
> {
> int ret;
> - char *argv[] = {VZNETCFG, "init", "veth", NULL, NULL};
> + char veidstr[12];
> + sprintf(veidstr, "%d", veid);
> + char *argv[] = {VZNETCFG, veidstr, "veth", NULL, NULL};
>
> if (stat_file(VZNETCFG) != 1)
> return 0;
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Devel mailing list
> Devel at openvz.org
> https://openvz.org/mailman/listinfo/devel
>
Is it Ok for you if I'll pass it in the environment
VEID=xxx
--
Igor.
More information about the Devel
mailing list