X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@lists.alpinelinux.org Received: from mail.squbes.com (squbes.com [208.74.142.49]) by lists.alpinelinux.org (Postfix) with ESMTP id 5AAFD17003B8C for ; Wed, 10 Dec 2008 18:23:40 +0000 (UTC) Received: from BigMac.private.net (pool-70-23-214-157.ny325.east.verizon.net [70.23.214.157]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: nangel@nothome.org) by mail.squbes.com (Postfix) with ESMTPSA id 4192F5000A016; Wed, 10 Dec 2008 18:23:40 +0000 (UTC) Message-ID: <4940092B.30306@nothome.org> Date: Wed, 10 Dec 2008 13:23:39 -0500 From: Nathan Angelacos User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 To: Harry Lachanas , Alpine Developers Subject: Re: [alpine-devel] bridge + problems References: <493FEC83.3020801@freemail.gr> In-Reply-To: <493FEC83.3020801@freemail.gr> Content-Type: text/plain; charset=ISO-8859-7; format=flowed Content-Transfer-Encoding: 7bit Harry, > The pre-down section complaints about pre-down entries being duplicates > as you can see I have comment out the down parts to bring the interface > up ... You've run into (yet another) busybox ifupdown weirdness. pre-down is not a valid keyword - but instead of reporting that, it says you have duplicates. (evidently you are allowed to have a "foobar" keyword in each stanza, but not two... ?! It appears to be a pretty common mistake to think there's a pre-down command (that would be logical) but the actual command is "down" so you have pre-up (before iface is "up") up (should be called post-up) down (should be called pre-down) post-down (after interface is "down") The following adjustments should work: auto br0 iface br0 inet static address 192.168.2.254 netmask 255.255.255.0 pre-up /usr/sbin/openvpn --mktun --dev tap0 pre-up /bin/ip link set tap0 up pre-up /bin/ip link set eth3 up pre-up /usr/sbin/brctl addbr br0 pre-up /usr/sbin/brctl addif br0 eth3 pre-up /usr/sbin/brctl addif br0 tap0 down /usr/sbin/brctl delif br0 eth3 down /bin/ip link set eth3 down down /usr/sbin/brctl delif br0 tap0 down /bin/ip link set tap0 down post-down /usr/sbin/brctl delbr br0 post-down /usr/sbin/openvpn --rmtun --dev tap0 One last thing that you might want to keep in mind: the sequence of *-up/down commands will stop whenever the *first* one returns false. For example, adding this line before the delif br0 eth3 ... down false down /usr/sbin/brctl delif br0 eth3 . . Will never actually run the delif/iplink/openvpn commands. That makes it possible to get into ifup/down hell where ifup says the device is already up, and ifdown won't let you take it down. I'm mention this so that if you ever run a command that *might* return false, you should escape it: down /usr/sbin/command_that_might_fail || true ^^^^^^^^^ The "|| true" forces the command to be true. Problem solved. :-) And, since I'm responding after natanael did, we have a fundamental difference of opinion on bridges - I think they are interfaces (they show up in ip link) so they should go in the interfaces file. He prefers the init.d script. Take your pick - either way will work. > BTW: No daemontools ????? should I compile my own ?? Natanael really likes busybox init :-) Send in a patch and I'm sure he'll add it though. > I know I can use inittab for this but I hate it ... > > > Cheers.. > > ( Thanks Nathan, NC ) > > Nathan U R Greek, correct ??? > Mostly the name. My father's father was greek - but I mostly take after my Hungarian mom... (Greeks+Hungarians... talk about hard-headed!) By the way, thanks very much for your work on muli-isp failover - its VERY much appreciated! --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---