ia64/xen-unstable

view tools/hotplug/NetBSD/vif-bridge-nbsd @ 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/sh -e
3 # $NetBSD: vif-bridge-nbsd,v 1.1.1.1 2008/08/07 20:26:57 cegger Exp $
4 # Called by xenbackendd
5 # Usage: vif-bridge xsdir_backend_path state
7 DIR=$(dirname "$0")
8 . "${DIR}/hotplugpath.sh"
10 PATH=${BINDIR}:${SBINDIR}:${LIBEXEC}:${PRIVATE_BINDIR}:/bin:/usr/bin:/sbin:/usr/sbin
11 export PATH
13 xpath=$1
14 xstatus=$2
16 case $xstatus in
17 6)
18 # device removed
19 xenstore-rm $xpath
20 exit 0
21 ;;
22 2)
23 xbridge=$(xenstore-read "$xpath/bridge")
24 xfid=$(xenstore-read "$xpath/frontend-id")
25 xhandle=$(xenstore-read "$xpath/handle")
26 iface=xvif$xfid.$xhandle
27 echo ifconfig $iface up
28 ifconfig $iface up
29 brconfig $xbridge add $iface
30 echo brconfig $xbridge add $iface
31 xenstore-write $xpath/hotplug-status connected
32 echo xenstore-write $xpath/hotplug-status connected
33 exit 0
34 ;;
35 *)
36 exit 0
37 ;;
38 esac