ia64/xen-unstable

annotate 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
rev   line source
keir@18770 1 #!/bin/bash
keir@18770 2 #============================================================================
keir@18770 3 # Default Xen network start/stop script.
keir@18770 4 # Xend calls a network script when it starts.
keir@19818 5 # The script name to use is defined in ${XEN_CONFIG_DIR}/xend-config.sxp
keir@18770 6 # in the network-script field.
keir@18770 7 #
keir@18770 8 # Usage:
keir@18770 9 #
keir@18770 10 # network-route (start|stop|status) {VAR=VAL}*
keir@18770 11 #
keir@18770 12 # Vars:
keir@18770 13 #
keir@18770 14 # netdev The gateway interface (default eth0).
keir@18770 15 # antispoof Whether to use iptables to prevent spoofing (default yes).
keir@18770 16 #
keir@18770 17 #============================================================================
keir@18770 18
keir@18770 19 dir=$(dirname "$0")
keir@19818 20 . "$dir/hotplugpath.sh"
keir@18770 21 . "$dir/xen-script-common.sh"
keir@18770 22
keir@18770 23 evalVariables "$@"
keir@18770 24
keir@18770 25 netdev=${netdev:-eth${vifnum}}
keir@18770 26
keir@18770 27 echo 1 >/proc/sys/net/ipv4/ip_forward
keir@18770 28 echo 1 >/proc/sys/net/ipv4/conf/${netdev}/proxy_arp