diff options
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 () { |