ia64/xen-unstable

view tools/hotplug/Linux/network-route @ 18770:4bfc67b09e9c

tools/hotplug: Separate OS-specific scripts.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Nov 04 12:13:42 2008 +0000 (2008-11-04)
parents
children 415505139333
line source
1 #!/bin/bash
2 #============================================================================
3 # Default Xen network start/stop script.
4 # Xend calls a network script when it starts.
5 # The script name to use is defined in /etc/xen/xend-config.sxp
6 # in the network-script field.
7 #
8 # Usage:
9 #
10 # network-route (start|stop|status) {VAR=VAL}*
11 #
12 # Vars:
13 #
14 # netdev The gateway interface (default eth0).
15 # antispoof Whether to use iptables to prevent spoofing (default yes).
16 #
17 #============================================================================
19 dir=$(dirname "$0")
20 . "$dir/xen-script-common.sh"
22 evalVariables "$@"
24 netdev=${netdev:-eth${vifnum}}
26 echo 1 >/proc/sys/net/ipv4/ip_forward
27 echo 1 >/proc/sys/net/ipv4/conf/${netdev}/proxy_arp