diff --git a/misc/usb_add_change b/misc/usb_add_change index 4440475..b2b5e6a 100755 --- a/misc/usb_add_change +++ b/misc/usb_add_change @@ -9,7 +9,7 @@ ## # FIXME: Ignore USB hubs and other wierd devices (see also in usb_remove). -[ "$DEVNUM" = "001" ] && exit 0 +[ "`echo $TYPE | cut -f1 -d/`" = "9" ] && exit 0 [ "$DEVTYPE" != "usb_device" ] && exit 0 # xenstore doesn't allow dot in key name diff --git a/misc/usb_remove b/misc/usb_remove index f7f33ed..aa562fa 100755 --- a/misc/usb_remove +++ b/misc/usb_remove @@ -1,7 +1,7 @@ #!/bin/sh # FIXME: Ignore USB hubs. -[ "$DEVNUM" = "001" ] && exit 0 +[ "`echo $TYPE | cut -f1 -d/`" = "9" ] && exit 0 NAME=`basename ${DEVPATH} | tr . _` XS_KEY="qubes-usb-devices/$NAME"