diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-10-05 14:14:04 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-10-05 14:14:04 +0100 |
commit | 5b6b39d3e98080d13c3a9c395a249c816f6a492f (patch) | |
tree | e6fa7e7955dd3ba8984689a4a57dbc122cc4c769 /tools/examples | |
parent | 792c98fdf60c07a4635b3d9e6c3ca0e2565cd681 (diff) | |
download | xen-5b6b39d3e98080d13c3a9c395a249c816f6a492f.tar.gz xen-5b6b39d3e98080d13c3a9c395a249c816f6a492f.tar.bz2 xen-5b6b39d3e98080d13c3a9c395a249c816f6a492f.zip |
Add Gentoo handling to network-bridge. Based on patches
from Jon Mason and Anthony Liguori.
Diffstat (limited to 'tools/examples')
-rwxr-xr-x | tools/examples/network-bridge | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/examples/network-bridge b/tools/examples/network-bridge index f743aae76e..f862db0c3f 100755 --- a/tools/examples/network-bridge +++ b/tools/examples/network-bridge @@ -55,6 +55,17 @@ 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 () { |