Files
xen/tools/hotplug/NetBSD/vif-bridge
T
Olaf Hering 8e986e5a61 tools: replace private SBINDIR with automake sbindir
Reuse automake variable instead of inventing a private variable.

The result of this command:
 git grep -wnl SBINDIR | xargs sed -i 's@SBINDIR@sbindir@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: Mukesh Rathor <mukesh.rathor@oracle.com>
Cc: Tim Deegan <tim@xen.org>
Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Cc: David Scott <dave.scott@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2015-05-21 15:12:10 +01:00

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