From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] don't require ebtables in the host kernel Date: Wed, 22 Feb 2006 16:23:32 +0200 Message-ID: <43FC73E4.6020105@qumranet.com> References: <43FC26DB.7060906@qumranet.com> <20060222133334.GF28961@leeni.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20060222133334.GF28961@leeni.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ewan Mellor Cc: xen-devel List-Id: xen-devel@lists.xenproject.org Ewan Mellor wrote: >>--- xen/tools/examples/network-bridge (revision 991) >>+++ xen/tools/examples/network-bridge (revision 992) >>@@ -158,9 +158,9 @@ >> >> # Don't create the bridge if it already exists. >> if ! brctl show | grep -q ${bridge} ; then >>- sysctl -w "net.bridge.bridge-nf-call-arptables=0" >>- sysctl -w "net.bridge.bridge-nf-call-ip6tables=0" >>- sysctl -w "net.bridge.bridge-nf-call-iptables=0" >>+ ! sysctl -w "net.bridge.bridge-nf-call-arptables=0" >>+ ! sysctl -w "net.bridge.bridge-nf-call-ip6tables=0" >>+ ! sysctl -w "net.bridge.bridge-nf-call-iptables=0" >> brctl addbr ${bridge} >> brctl stp ${bridge} off >> brctl setfd ${bridge} 0 >> >> > >Where did this network-bridge script come from? The stock Xen-3.0 >network-bridge doesn't have these sysctl lines in the first place. > > It comes from FC5. Sorry, should have checked the pristine Xen sources. Sorry about the noise. >Furthermore, using ! doesn't ignore the return value -- it inverts it. I'd be >surprised if this works in systems that _do_ have ebtables. > > No, ! on the beginning of a command tells bash to ignore the exit code: `-e' Exit immediately if a simple command (*note Simple Commands::) exits with a non-zero status, unless the command that fails is part of the command list immediately following a `while' or `until' keyword, part of the test in an `if' statement, part of a `&&' or `||' list, or if the command's return status is being inverted using `!'. A trap on `ERR', if set, is executed before the shell exits. 'sysctl -ew' would have been better though. -- error compiling committee.c: too many arguments to function