Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 277473 - sys-apps/openrc-0.4.3-r3 can't handle bridge device named bridge
Summary: sys-apps/openrc-0.4.3-r3 can't handle bridge device named bridge
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: x86 Linux
: Low normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-12 07:24 UTC by Benjamin R. Haskell
Modified: 2010-02-10 18:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
sys-apps/openrc-0.4.3-r3 patch for bridge named 'bridge' (0003-bridge-named-bridge.patch,1012 bytes, patch)
2009-07-12 07:27 UTC, Benjamin R. Haskell
Details | Diff
Path for OpenRC to use Bridges named 'bridge' using sed instead of tail (openrc.patch,1.24 KB, patch)
2010-01-25 14:33 UTC, Trevor Summers Smith
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin R. Haskell 2009-07-12 07:24:01 UTC
openrc doesn't like having a bridge device with the name 'bridge'.  As with bug #277464, it's a problem with 'brctl'.  In this case, openrc's bridge.sh script is reading the output, grep'ing for "^${IFACE}[[:space:]]".  In my case, the output is:

$ brctl show
bridge name     bridge id               STP enabled     interfaces
bridge          8000.001d722ae770       no              wired

Unfortunately, the header line matches when ${IFACE} is 'bridge', causing bridge.sh to think the bridge named 'bridge' is up when it isn't.
Comment 1 Benjamin R. Haskell 2009-07-12 07:27:00 UTC
Created attachment 197608 [details, diff]
sys-apps/openrc-0.4.3-r3 patch for bridge named 'bridge'

This patches the net/bridge.sh script to avoid the bug.  I'm not 100% sure 'tail -n +2' is portable, but my sed-fu is nowhere near my perl-fu so I didn't alter the sed commands, and perl seemed like overkill.
Comment 2 Roy Marples 2009-10-11 15:39:33 UTC
Hmmm, we need to fix the sed as tail is in /usr ...
Comment 3 Trevor Summers Smith 2010-01-25 14:33:22 UTC
Created attachment 217389 [details, diff]
Path for OpenRC to use Bridges named 'bridge' using sed instead of tail

I did not include changes to the ebuild because it seems that given Roy is on this bug the patch is meant for upstream.

I patched this off of commit ecf9ef49a724f6b95039bd760893f51a920f017b. The patch works with OpenRC 0.6.0 as well. Tested with both above commit and OpenRC 0.6.0, using net-misc/bridge-utils-1.4.

Thanks.
Comment 5 William Hubbs gentoo-dev 2010-02-10 18:48:33 UTC
This is fixed upstream, and will be included in the next release of gentoo (current release is 0.6.0-r1).