mirror of
https://github.com/mvp/uhubctl.git
synced 2026-05-17 00:16:13 +03:00
Improve Linux udev rules to support more systems
Some Linux systems detect USB hubs with driver as `hub`, and some as `usb`. Improve udev permission rules to match both options. Closes #618.
This commit is contained in:
@@ -16,9 +16,9 @@
|
|||||||
# sudo usermod -a -G dialout $USER
|
# sudo usermod -a -G dialout $USER
|
||||||
|
|
||||||
# This is for Linux before 6.0:
|
# This is for Linux before 6.0:
|
||||||
SUBSYSTEM=="usb", DRIVER=="usb", MODE="0664", GROUP="dialout"
|
SUBSYSTEM=="usb", DRIVER=="hub|usb", MODE="0664", GROUP="dialout"
|
||||||
|
|
||||||
# This is for Linux 6.0 or later (ok to keep this block present for older Linux kernels):
|
# This is for Linux 6.0 or later (ok to keep this block present for older Linux kernels):
|
||||||
SUBSYSTEM=="usb", DRIVER=="usb", \
|
SUBSYSTEM=="usb", DRIVER=="hub|usb", \
|
||||||
RUN+="/bin/sh -c \"chown -f root:dialout $sys$devpath/*port*/disable || true\"" \
|
RUN+="/bin/sh -c \"chown -f root:dialout $sys$devpath/*port*/disable || true\"" \
|
||||||
RUN+="/bin/sh -c \"chmod -f 660 $sys$devpath/*port*/disable || true\""
|
RUN+="/bin/sh -c \"chmod -f 660 $sys$devpath/*port*/disable || true\""
|
||||||
|
|||||||
Reference in New Issue
Block a user