~ressu/+junk/xen-ubuntu

« back to all changes in this revision

Viewing changes to tools/hotplug/Linux/network-route

  • Committer: sami at haahtinen
  • Author(s): Bastian Blank
  • Date: 2010-09-03 15:14:28 UTC
  • Revision ID: sami@haahtinen.name-20100903151428-f88eg54n2fdnak41
Tags: upstream-4.0.1
ImportĀ upstreamĀ versionĀ 4.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 ${XEN_CONFIG_DIR}/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
#============================================================================
 
18
 
 
19
dir=$(dirname "$0")
 
20
. "$dir/hotplugpath.sh"
 
21
. "$dir/xen-script-common.sh"
 
22
 
 
23
evalVariables "$@"
 
24
 
 
25
netdev=${netdev:-eth${vifnum}}
 
26
 
 
27
echo 1 >/proc/sys/net/ipv4/ip_forward
 
28
echo 1 >/proc/sys/net/ipv4/conf/${netdev}/proxy_arp