-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
By using a single matching strategy in the udev rules, we can simplify this down to one rule and one script for attaching export devices, as the device paths passed to the script for either storage or printer devices will be at equivalent depths.
- Loading branch information
Showing
6 changed files
with
16 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
ACTION=="add", SUBSYSTEM=="usb", DRIVER=="usb-storage", RUN+="/usr/local/bin/sd-attach-export-disk" | ||
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", RUN+="/usr/local/bin/sd-attach-export-printer" | ||
# Class 08 == storage, subclass 06 == SCSI | ||
# Class 07 == printer, subclass 01 == printer | ||
# https://www.usb.org/defined-class-codes | ||
# https://www.usb.org/document-library/mass-storage-class-specification-overview-14 | ||
# https://www.usb.org/document-library/printer-device-class-document-11 | ||
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0806??:*|*:0701??:*", RUN+="/usr/local/bin/sd-attach-export-device" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# udev action for attaching USB export devices to sd-export-usb | ||
|
||
QDEVNAME="$(basename $DEVPATH)" | ||
echo sys-usb "$QDEVNAME" | qrexec-client-vm sd-export-usb qubes.USBAttach |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters