summary refs log tree commit diff
path: root/noarch/etc/smfp.rules.in
blob: 0d1c1d9ccbbf624f70d62985466919628f588856 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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\\"