diff options
author | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2019-10-17 13:42:15 -0700 |
---|---|---|
committer | jc_gargma <jc_gargma@iserlohn-fortress.net> | 2019-10-17 13:42:15 -0700 |
commit | d9a946cb4a109c3735b109ad36c0ed595edac303 (patch) | |
tree | 5c6ee01b80fa52d53997a91e2c72f3d873c2b1b7 /mk-udev-rules | |
download | brscan4-d9a946cb4a109c3735b109ad36c0ed595edac303.tar.xz |
Diffstat (limited to 'mk-udev-rules')
-rwxr-xr-x | mk-udev-rules | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mk-udev-rules b/mk-udev-rules new file mode 100755 index 0000000..8f00b79 --- /dev/null +++ b/mk-udev-rules @@ -0,0 +1,17 @@ +#!/usr/bin/gawk -f +BEGIN { + FS = ","; + print "ACTION==\"add\", ATTR{idVendor}==\"04f9\", GOTO=\"brscan4\""; + print "GOTO=\"brscan4_end\""; + print "LABEL=\"brscan4\""; +} +NF >= 3 && $1 ~ /^ *0[xX][[:xdigit:]]+ *$/ { + id = "000" tolower( substr( $1, 3 )); + id = substr( id, length( id ) - 3 ); + #print "ATTR{idProduct}==\"" id "\", MODE=\"0664\", GROUP=\"scanner\", ENV{libsane_matched}=\"yes\""; + print "ATTR{idProduct}==\"" id "\", MODE=\"0664\", GROUP=\"lp\", ENV{libsane_matched}=\"yes\""; +} +END { + print "LABEL=\"brscan4_end\""; +} + |