mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
Reuse automake variable instead of inventing a private variable. The result of this command: git grep -wnl BINDIR | xargs sed -i 's@BINDIR@bindir@g' Signed-off-by: Olaf Hering <olaf@aepfle.de> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Cc: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
36 lines
678 B
Bash
36 lines
678 B
Bash
#!/bin/sh -e
|
|
|
|
# $NetBSD: vif-bridge-nbsd,v 1.1.1.1 2008/08/07 20:26:57 cegger Exp $
|
|
# Called by xenbackendd
|
|
# Usage: vif-bridge xsdir_backend_path state
|
|
|
|
DIR=$(dirname "$0")
|
|
. "${DIR}/hotplugpath.sh"
|
|
|
|
PATH=${bindir}:${sbindir}:${LIBEXEC_BIN}:/bin:/usr/bin:/sbin:/usr/sbin
|
|
export PATH
|
|
|
|
xpath=$1
|
|
xstatus=$2
|
|
|
|
case $xstatus in
|
|
6)
|
|
# device removed
|
|
xenstore-rm $xpath
|
|
exit 0
|
|
;;
|
|
2)
|
|
xbridge=$(xenstore-read "$xpath/bridge")
|
|
xfid=$(xenstore-read "$xpath/frontend-id")
|
|
xhandle=$(xenstore-read "$xpath/handle")
|
|
iface=$(xenstore-read "$xpath/vifname")
|
|
ifconfig $iface up
|
|
brconfig $xbridge add $iface
|
|
xenstore-write $xpath/hotplug-status connected
|
|
exit 0
|
|
;;
|
|
*)
|
|
exit 0
|
|
;;
|
|
esac
|