]> git.ipfire.org Git - thirdparty/lxc.git/commit
Store alien config lines
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 12 Jun 2014 13:46:37 +0000 (13:46 +0000)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 18 Jun 2014 20:56:17 +0000 (16:56 -0400)
commit4184c3e1723d2cc7295c1e81022c69f26595ec58
tree2a16926492423124d19b4b832b8b5b094283b258
parentf979ac15923809df97d9b7b16a1411d20f386777
Store alien config lines

Any config lines not starting with 'lxc.*' are ignored by lxc.  That
can be useful for third party tools, however lxc-clone does not copy such
lines.

Fix that by tracking such lines in our unexpanded config file and
printing them out at write_config().  Note two possible shortcomings here:

1. we always print out all includes followed by all aliens.  They are
not kept in order, nor ordered with respect to lxc.* lines.

2. we're still not storing comments. these could easily be added to
the alien lines, but i chose not to in particular since comments are
usually associated with other lines, so destroying the order would
destroy their value.  I could be wrong about that, and if I am it's
a trivial fix.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/conf.c
src/lxc/conf.h
src/lxc/confile.c