Source: lxc
Version: 1:2.0.9-6
Severity: wishlist

Dear Maintainer,

I've tried investigating why lxc has a Recommends: bridge-utils, but
unfortunately haven't found anything information why it's there or
why it was added initially.

I can only find usage of the 'brctl' command in:
1: ./templates/lxc-gentoo.in
2: ./src/tests/lxc-test-usernic.in

The second one seems to only conditionally be installed on ubuntu
according to src/tests/Makefile.am, so not relevant. I'm not sure how
relevant the first one is either, but I'll include a trivial (untested)
patch you can drop into debian/patches if you'd like it to use bridge
(from iproute2) instead.

I hope this means bridge-utils can be dropped (or replaced by iproute2
if needed). If you know of any reason not to drop bridge-utils I'd like
to hear about it!

Regards,
Andreas Henriksson
From: Andreas Henriksson <[email protected]>
Subject: Replace bridge-utils/brctl usage with iproute2/bridge

--- a/templates/lxc-gentoo.in
+++ b/templates/lxc-gentoo.in
@@ -578,7 +578,7 @@
     #No NIC ?
     if [[ ${nic_count} == 0 ]]; then
         #If no Nic, no need to continue
-        bridge=$(brctl show | awk 'NR==2 {print $1}')
+        bridge=$(bridge link show | awk 'NR==1 {print $2}')
         if [[ "${bridge}" != "" ]]; then
                         store_user_message "No network interface for this container
 It's a pitty, you have bridge, ${bridge}.

Reply via email to