[lxc-devel] [PATCH 5/5] Add distro config file /etc/lxc/lxc.conf

Dwight Engen dwight.engen at oracle.com
Mon Oct 15 18:00:51 UTC 2012


On Mon, 15 Oct 2012 12:42:57 -0500
Serge Hallyn <serge.hallyn at canonical.com> wrote:

> Quoting Dwight Engen (dwight.engen at oracle.com):
> > This allows a distro to put the distro specific default network
> > configuration (for example bridge device, link type), or other lxc
> > configuration in the case that -f is not passed by the user to
> > lxc-create, in which case lxc-create will use the distro conf file
> > as the basis for the containers config.
> 
> I think this is great.  Note though that debian does not have an
> lxcbr0, only Ubuntu does.

Ahh, so what should we use for distro detection? I went looking a bit
and systemd's configure.ac looks for an /etc/os-release but I didn't
find that on any distro I looked at except fedora 17, so I don't
think that will work for older distros. I guess we could use
lsb_release --id?

> This is getting "out there", but I wonder if, for the unknown os case,
> it would be reliable to look at the default nic, and check if it is a
> bridge, and use that bridge if so.

By "default nic" do you mean do something like `brctl show` and use the
first bridge name found?




More information about the lxc-devel mailing list