ia64/xen-unstable

view tools/hotplug/Linux/network-route @ 19818:415505139333

Get rid of hardcoded pathes for stubdom and hotplug scripts

- Have the buid system generate a file which exports the install paths
for the hotplug scripts and stubdom / stubdom-dm
- Move file generation code from tools/python/Makefile into a gmake
macro
in Config.mk to avoid maintenance of three duplicates each with its
own
tweaks and bugs
- Export gmake variables into ioemu as shell variables
for upcoming ioemu patches
- Do above as a gmake macro to avoid maintenance of several duplicates
- Adjust hotplug scripts to find the right xen binaries from the
install directory
- Adjust stubdom-dm to use the install directories

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jun 23 17:25:51 2009 +0100 (2009-06-23)
parents 4bfc67b09e9c
children
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 ${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 #============================================================================
19 dir=$(dirname "$0")
20 . "$dir/hotplugpath.sh"
21 . "$dir/xen-script-common.sh"
23 evalVariables "$@"
25 netdev=${netdev:-eth${vifnum}}
27 echo 1 >/proc/sys/net/ipv4/ip_forward
28 echo 1 >/proc/sys/net/ipv4/conf/${netdev}/proxy_arp