diff options
author | Starfall <us@starfall.systems> | 2024-01-08 09:40:24 -0600 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2024-01-08 09:40:24 -0600 |
commit | a91d41375fc87c958f0b4b2ec09d5bfa2bab9414 (patch) | |
tree | 5ecf2d3f5b5962bb2d317ad4ce1fddd88e8b0ed7 /noarch/etc/smfp.rules.in |
Diffstat (limited to 'noarch/etc/smfp.rules.in')
-rwxr-xr-x | noarch/etc/smfp.rules.in | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/noarch/etc/smfp.rules.in b/noarch/etc/smfp.rules.in new file mode 100755 index 0000000..0d1c1d9 --- /dev/null +++ b/noarch/etc/smfp.rules.in @@ -0,0 +1,29 @@ +# This file is a part of Unified Linux Driver +# Rules to allow low level USB device access for smfpautoconf +# +# For new distributions, +# Permissions and group are set according to common libsane rules +# + +ACTION!=\\"add\\", GOTO=\\"smfp_label_end\\" + +# Check device type +ENV{DEVTYPE}==\\"usb_device\\", GOTO=\\"smfp_create_usb_dev\\" + +# Check SUBSYSTEM (should be either \\"usb\\" or \\"usb_device\\") +SUBSYSTEM==\\"usb\\", GOTO=\\"smfp_create_usb_dev\\" +SUBSYSTEM==\\"usb_device\\", GOTO=\\"smfp_create_usb_dev\\" + +GOTO=\\"smfp_label_end\\" + +LABEL=\\"smfp_create_usb_dev\\" + +# Check Vendor ID +ATTR{idVendor}!=\\"$VID\\", GOTO=\\"smfp_label_end\\" + +$(for pid in $PIDS ; do echo "ATTRS{idProduct}==\\"$pid\\", ENV{libsane_matched}=\\"yes\\"" ; done) + +ENV{libsane_matched}==\\"yes\\", OWNER=\\"root\\", MODE=\\"664\\", GROUP=\\"lp\\" + +LABEL=\\"smfp_label_end\\" + |