qubes-linux-utils/udev/udev-usb-remove
2014-11-19 15:10:58 +01:00

11 lines
217 B
Bash
Executable File

#!/bin/sh
# FIXME: Ignore USB hubs.
[ "`echo $TYPE | cut -f1 -d/`" = "9" ] && exit 0
NAME=`basename ${DEVPATH} | tr . _`
QDB_KEY="/qubes-usb-devices/$NAME"
qubesdb-rm "$QDB_KEY"
qubesdb-write /qubes-usb-devices ''