Dies schrieb Daniel Lezcano (daniel.lezc...@free.fr): > I suggest you add a lxc.network.script section where it will be > called from each instanciate_*
OK, that's what an earlier version of the patch did, so I partially reverted :-) > The script should receive always the two parameters: > > $1 : container name > $2 : configuration section : "network", "pts", etc ... What is the easiest way to retrieve the container name from inside instanciate_*? All it gets passed have is the lxc_netdev struct, and I'd like to avoid changing several signatures. > And the optional parameters depending of the hooks caller: > > In your case: > $3 : network type "veth", ... > $4 : network link > $5 : guest ifname > $6 : host ifname (in case of veth) Is the guest ifname really useful? The script runs in the context of the host, what can be achieved with it? > use the /* */ format to conform to the Coding Style please. OK, that was an easy change... > >+ return status; > > Do we assume the script returns always 0 on success ? and we don't > care about the WIFSIGNALED, ... ? I'd suggest that a non-zero exit value indicates some kind of problem with the network configuration and should abort the network setup. Thanks for your feedback, I'll see what I can do about it :) ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel