WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Gentoo compatible stuff has to be done *before* the set

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Gentoo compatible stuff has to be done *before* the set -e. You could also do
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 05 Oct 2005 18:32:10 +0000
Delivery-date: Wed, 05 Oct 2005 18:30:06 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Gentoo compatible stuff has to be done *before* the set -e. You could also do, Xen patchbot -unstable <=