core-admin/misc/usb_remove
Marek Marczykowski 4b44a149c1 dom+vm/qvm-usb: improve handling devices like "2-1.4"
xenstore doesn't allow '.' in key name, so translate it to '_'
2012-10-23 05:42:39 +02:00

10 lines
162 B
Bash
Executable File

#!/bin/sh
# FIXME: Ignore USB hubs.
[ "$DEVNUM" = "001" ] && exit 0
NAME=`basename ${DEVPATH} | tr . _`
XS_KEY="qubes-usb-devices/$NAME"
xenstore-rm "$XS_KEY"