ia64/xen-unstable

changeset 7222:e579bef0d237

Add Gentoo handling to network-bridge. Based on patches
from Jon Mason and Anthony Liguori.
author kaf24@firebug.cl.cam.ac.uk
date Wed Oct 05 14:14:04 2005 +0100 (2005-10-05)
parents e643fccb851b
children 6bbfd6a98974
files tools/examples/network-bridge
line diff
     1.1 --- a/tools/examples/network-bridge	Wed Oct 05 14:10:49 2005 +0100
     1.2 +++ b/tools/examples/network-bridge	Wed Oct 05 14:14:04 2005 +0100
     1.3 @@ -55,6 +55,17 @@ antispoof=${antispoof:-no}
     1.4  
     1.5  echo "*network $OP bridge=$bridge netdev=$netdev antispoof=$antispoof" >&2
     1.6  
     1.7 +# Gentoo doesn't have ifup/ifdown: define appropriate alternatives
     1.8 +which ifup >& /dev/null
     1.9 +if [ "$?" != 0 -a -e /etc/conf.d/net ]; then
    1.10 +    ifup() {
    1.11 +        /etc/init.d/net.$1 start
    1.12 +    }
    1.13 +    ifdown() {
    1.14 +        /etc/init.d/net.$1 stop
    1.15 +    }
    1.16 +fi
    1.17 +
    1.18  # Usage: transfer_addrs src dst
    1.19  # Copy all IP addresses (including aliases) from device $src to device $dst.
    1.20  transfer_addrs () {