File: network-route

package info (click to toggle)
xen-common 3.2.0-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 680 kB
  • ctags: 279
  • sloc: sh: 2,708; makefile: 288; perl: 186; python: 170; xml: 8
file content (27 lines) | stat: -rwxr-xr-x 741 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/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