Browse Source

Refactor usb-storage-rules for checking add and remove

usb-socket
Mohammad_Faraji 6 months ago
parent
commit
315598f5ad
  1. 5
      src/rules/90-usb-storage.rules

5
src/rules/90-usb-storage.rules

@ -1 +1,4 @@
ACTION=="add", SUBSYSTEM=="block", ENV{ID_BUS}=="usb", ENV{ID_FS_USAGE}=="filesystem", RUN+="/usr/bin/sudo /usr/local/bin/usb-storage-action %E{DEVNAME}"
# Rule for USB device connection
ACTION=="add", SUBSYSTEM=="block", ENV{ID_BUS}=="usb", ENV{ID_FS_USAGE}=="filesystem", RUN+="/usr/bin/sudo /usr/local/bin/usb-storage-action add %E{DEVNAME}"
# Rule for USB device disconnection
ACTION=="remove", SUBSYSTEM=="block", ENV{ID_BUS}=="usb", ENV{ID_FS_USAGE}=="filesystem", RUN+="/usr/bin/sudo /usr/local/bin/usb-storage-action remove %E{DEVNAME}"

Loading…
Cancel
Save