[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Gentoo compatible stuff has to be done *before* the set -e. You could also do



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID f98c8238e9095a2dad33639211ba95a2a459af12
# Parent  c3d9b7013b1442bcc8890da3b60e8e19688ac1a0
Gentoo compatible stuff has to be done *before* the set -e.  You could also do
the which in the if with a combination of ! and || after the set -e but I think
it's cleaner to just do it before the set -e.

Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx>

diff -r c3d9b7013b14 -r f98c8238e909 tools/examples/network-bridge
--- a/tools/examples/network-bridge     Wed Oct  5 18:14:13 2005
+++ b/tools/examples/network-bridge     Wed Oct  5 18:15:56 2005
@@ -38,22 +38,6 @@
 # Print routes.
 #
 #============================================================================
-
-# Exit if anything goes wrong.
-set -e 
-
-# First arg is the operation.
-OP=$1
-shift
-
-# Pull variables in args in to environment.
-for arg ; do export "${arg}" ; done
-
-bridge=${bridge:-xen-br0}
-netdev=${netdev:-eth0}
-antispoof=${antispoof:-no}
-
-echo "*network $OP bridge=$bridge netdev=$netdev antispoof=$antispoof" >&2
 
 # Gentoo doesn't have ifup/ifdown: define appropriate alternatives
 which ifup >& /dev/null
@@ -65,6 +49,22 @@
         /etc/init.d/net.$1 stop
     }
 fi
+
+# Exit if anything goes wrong.
+set -e 
+
+# First arg is the operation.
+OP=$1
+shift
+
+# Pull variables in args in to environment.
+for arg ; do export "${arg}" ; done
+
+bridge=${bridge:-xen-br0}
+netdev=${netdev:-eth0}
+antispoof=${antispoof:-no}
+
+echo "*network $OP bridge=$bridge netdev=$netdev antispoof=$antispoof" >&2
 
 # Usage: transfer_addrs src dst
 # Copy all IP addresses (including aliases) from device $src to device $dst.

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.