]> git.ipfire.org Git - thirdparty/lxc.git/commit
lxc-update-config: handle legacy networks 1763/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 28 Aug 2017 14:34:07 +0000 (16:34 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 28 Aug 2017 14:37:18 +0000 (16:37 +0200)
commit37694da4b5b3dc0ef17ae8372251bd26de58ee4b
tree4ce0b9971c089ce2ada882aaa8d8f3a858715e4d
parent04ba27e0dc8d7a72bfea263bf60219defec5af21
lxc-update-config: handle legacy networks

Older instances of liblxc allowed to specify networks like this:

lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = lxdbr0
lxc.network.name= eth0

lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = lxdbr0
lxc.network.name = eth1

Each occurrence of "lxc.network.type" indicated the definition of a new
network. This syntax is not allowed in newer liblxc instances. Instead, network
must carry an index. So in new liblxc these two networks would be translated to:

lxc.net.0.type = veth
lxc.net.0.flags = up
lxc.net.0.link = lxdbr0
lxc.net.0.name= eth0

lxc.net.1.type = veth
lxc.net.1.flags = up
lxc.net.1.link = lxdbr0
lxc.net.1.name = eth1

The update script did not handle this case correctly. It should now.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/tools/lxc-update-config.in