Files
xen/tools/examples/network-route
T
Alastair Tse b2bfd9596f Switch hotplug scripts to use /bin/bash rather than /bin/sh.
Hotplug scripts include certain bash-isms that are not supported under
some distros' default shell (eg. Ubuntu 6.10's use of dash)

Signed-off-by: Alastair Tse <atse@xensource.com>
2007-01-04 14:25:58 +00:00

28 lines
741 B
Bash
Executable File

#!/bin/bash
#============================================================================
# Default Xen network start/stop script.
# Xend calls a network script when it starts.
# The script name to use is defined in /etc/xen/xend-config.sxp
# in the network-script field.
#
# Usage:
#
# network-route (start|stop|status) {VAR=VAL}*
#
# Vars:
#
# netdev The gateway interface (default eth0).
# antispoof Whether to use iptables to prevent spoofing (default yes).
#
#============================================================================
dir=$(dirname "$0")
. "$dir/xen-script-common.sh"
evalVariables "$@"
netdev=${netdev:-eth${vifnum}}
echo 1 >/proc/sys/net/ipv4/ip_forward
echo 1 >/proc/sys/net/ipv4/conf/${netdev}/proxy_arp