Files
xen/tools/hotplug/NetBSD/vif-ip
T
Olaf Hering 8db2e4bab2 tools: replace private BINDIR with automake bindir
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>
2015-05-21 15:12:10 +01:00

35 lines
637 B
Bash

#!/bin/sh -e
# $NetBSD: vif-ip-nbsd,v 1.1.1.1 2008/08/07 20:26:57 cegger Exp $
# Called by xenbackendd
# Usage: vif-ip 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)
xip=$(xenstore-read "$xpath/ip")
xfid=$(xenstore-read "$xpath/frontend-id")
xhandle=$(xenstore-read "$xpath/handle")
iface=$(xenstore-read "$xpath/vifname")
ifconfig $iface $xip up
xenstore-write $xpath/hotplug-status connected
exit 0
;;
*)
exit 0
;;
esac