aboutsummaryrefslogtreecommitdiffstats
path: root/tools/examples/network-bridge
diff options
context:
space:
mode:
Diffstat (limited to 'tools/examples/network-bridge')
-rwxr-xr-xtools/examples/network-bridge22
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/examples/network-bridge b/tools/examples/network-bridge
index f862db0c3f..f0e1e1648d 100755
--- a/tools/examples/network-bridge
+++ b/tools/examples/network-bridge
@@ -39,6 +39,17 @@
#
#============================================================================
+# Gentoo doesn't have ifup/ifdown: define appropriate alternatives
+which ifup >& /dev/null
+if [ "$?" != 0 -a -e /etc/conf.d/net ]; then
+ ifup() {
+ /etc/init.d/net.$1 start
+ }
+ ifdown() {
+ /etc/init.d/net.$1 stop
+ }
+fi
+
# Exit if anything goes wrong.
set -e
@@ -55,17 +66,6 @@ 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
-if [ "$?" != 0 -a -e /etc/conf.d/net ]; then
- ifup() {
- /etc/init.d/net.$1 start
- }
- ifdown() {
- /etc/init.d/net.$1 stop
- }
-fi
-
# Usage: transfer_addrs src dst
# Copy all IP addresses (including aliases) from device $src to device $dst.
transfer_addrs () {