/usr/lib/xcp/scripts/tap is in xcp-xapi 1.3.2-5.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | #!/bin/sh
TYPE=`echo ${XENBUS_PATH} | cut -f 2 -d '/'`
DOMID=`echo ${XENBUS_PATH} | cut -f 3 -d '/'`
DEVID=`echo ${XENBUS_PATH} | cut -f 4 -d '/'`
XAPI=/xapi/${DOMID}/hotplug/${TYPE}/${DEVID}
syslog ()
{
BLKTAP=daemon
logger -p$BLKTAP.info -tscripts-tap "$*"
}
case "$1" in
add)
syslog "$XAPI: hotplug deferred to backend change"
;;
change)
syslog "$XAPI: backend changed"
xenstore-write "${XAPI}/hotplug" "online"
;;
remove)
syslog "$XAPI: backend removed"
xenstore-rm "${XAPI}/hotplug"
;;
esac
|