-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathudev-es2button.rules
More file actions
28 lines (16 loc) · 905 Bytes
/
udev-es2button.rules
File metadata and controls
28 lines (16 loc) · 905 Bytes
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
# copy this file to /etc/udev/rules.d/
# reload udev rules: sudo udevadm control --reload-rules
# The udev rule listens for USB events and calls
# systemd es2button@ service with the correct args to es2button
ENV{DEVTYPE}!="usb_device", GOTO="es2button_rules_end"
ATTR{idVendor}!="04b8", GOTO="es2button_rules_end"
ACTION!="add|bind", GOTO="es2button_add_rules_end"
LABEL="es2button_add_rules_begin"
# these are set by the epsonscan2 rules, we just match on everything it matches
ENV{epsonscan2_driver}=="esci*", ENV{libsane_matched}=="yes", PROGRAM="/bin/systemd-escape '%s{product}:%s{busnum}:%s{devnum}'", RUN+="/usr/bin/systemctl start es2button@%c.service"
LABEL="es2button_add_rules_end"
ACTION!="remove", GOTO="es2button_rules_end"
LABEL="es2button_del_rules_begin"
# should we ever need to do something on remove, here be it
LABEL="es2button_del_rules_end"
LABEL="es2button_rules_end"