qports/qubes-usb-proxy/usb-import-alpine-udevadm.patch

27 lines
1 KiB
Diff

diff --git a/src/usb-import.orig b/src/usb-import
index 7b17799..e718795 100755
--- a/src/usb-import.orig
+++ b/src/usb-import
@@ -95,7 +95,7 @@ wait_for_attached() {
ERROR "Attach timeout, check kernel log for details."
fi
done
- [ -f "/usr/bin/udevadm" ] && udevadm settle
+ [ -f "/bin/udevadm" ] && udevadm settle
}
wait_for_detached() {
diff --git a/src/usb-export.orig b/src/usb-export
index ad2ab2b..37cff16 100755
--- a/src/usb-export.orig
+++ b/src/usb-export
@@ -110,8 +110,7 @@ if [ -n "$attach_to_usbip" ]; then
echo "$busid" > "$SYS_USBIP_HOST/bind" || exit 1
# optionally reset the device to clear any state from previous driver
- reset_on_attach=$(udevadm info --query=property \
- --value --property=QUBES_USB_RESET --path="$devpath")
+ reset_on_attach=$(udevadm info --query=property --path="$devpath" | awk -F "=" '{if($1=="QUBES_USB_RESET"){print $2}}' )
if [ -f /run/qubes-service/usb-reset-on-attach ]; then
reset_on_attach=1
fi