File: 0006-Correct-the-udev-rules.patch

package info (click to toggle)
foo2zjs 20160902dfsg0-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,944 kB
  • ctags: 5,880
  • sloc: ansic: 39,074; xml: 12,015; sh: 6,903; makefile: 1,648; objc: 573; tcl: 171; perl: 102; python: 8
file content (89 lines) | stat: -rw-r--r-- 4,477 bytes parent folder | download
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
From f26a93eb710e13894b8ff65923ed512d62e23866 Mon Sep 17 00:00:00 2001
From: Luca Capello <luca@pca.it>
Date: Tue, 4 Oct 2016 11:43:49 +0200
Subject: Correct the udev rules:

 a) remove KERNEL=="lp*", as usblp is now blacklisted by CUPS (it will work without CUPS too).
 b) Replace paths: /etc/hotplug/usb/ by no path, as the binaries are shipped in /lib/udev/
 c) Drop the MODE specification
 d) Add ACTION=="ADD", otherwise the firmware script runs after unplugging as well
Author: Didier Raboud <odyx@debian.org>
Author: Peter De Wachter <pdewacht@gmail.com>
---
 hplj10xx.rules | 58 +++++++++++++++++++++++++++++++---------------------------
 1 file changed, 31 insertions(+), 27 deletions(-)

diff --git a/hplj10xx.rules b/hplj10xx.rules
index ee0295d..3d69ca3 100644
--- a/hplj10xx.rules
+++ b/hplj10xx.rules
@@ -2,38 +2,42 @@
 #       hplj10xx.rules.old: udev equal or after 1.30
 #
 #Own udev rule for HP Laserjet 1000
-KERNEL=="lp*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", \
-	ATTRS{product}=="hp LaserJet 1000", NAME="usb/%k", \
-	SYMLINK+="hplj1000-%n", MODE="0666", RUN+="/etc/hotplug/usb/hplj1000" 
+ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", \
+	ATTRS{product}=="hp LaserJet 1000", \
+	SYMLINK+="hplj1000-%n", RUN+="hplj1000" 
 #Own udev rule for HP Laserjet 1005
-KERNEL=="lp*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", \
-	ATTRS{product}=="hp LaserJet 1005 series", NAME="usb/%k", \
-	SYMLINK+="hplj1005-%n", MODE="0666", RUN+="/etc/hotplug/usb/hplj1005" 
+ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", \
+	ATTRS{product}=="hp LaserJet 1005 series", \
+	SYMLINK+="hplj1005-%n", RUN+="hplj1005" 
 #Own udev rule for HP Laserjet 1018
-KERNEL=="lp*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", \
-	ATTRS{product}=="HP LaserJet 1018", NAME="usb/%k", \
-	SYMLINK+="hplj1018-%n", MODE="0666", RUN+="/etc/hotplug/usb/hplj1018" 
+ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", \
+	ATTRS{product}=="HP LaserJet 1018", \
+	SYMLINK+="hplj1018-%n", RUN+="hplj1018" 
 #Own udev rule for HP Laserjet 1020
-KERNEL=="lp*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", \
-	ATTRS{product}=="HP LaserJet 1020", NAME="usb/%k", \
-	SYMLINK+="hplj1020-%n", MODE="0666", RUN+="/etc/hotplug/usb/hplj1020" 
+ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", \
+	ATTRS{product}=="HP LaserJet 1020", \
+	SYMLINK+="hplj1020-%n", RUN+="hplj1020" 
 #Own udev rule for HP Laserjet P1005
-KERNEL=="lp*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", \
-	ATTRS{product}=="HP LaserJet P1005", NAME="usb/%k", \
-	SYMLINK+="hpljP1005-%n", MODE="0666", RUN+="/etc/hotplug/usb/hpljP1005" 
+ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", \
+	ATTRS{product}=="HP LaserJet P1005", \
+	SYMLINK+="hpljP1005-%n", RUN+="hpljP1005" 
 #Own udev rule for HP Laserjet P1006
-KERNEL=="lp*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", \
-	ATTRS{product}=="HP LaserJet P1006", NAME="usb/%k", \
-	SYMLINK+="hpljP1006-%n", MODE="0666", RUN+="/etc/hotplug/usb/hpljP1006" 
+ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", \
+	ATTRS{product}=="HP LaserJet P1006", \
+	SYMLINK+="hpljP1006-%n", RUN+="hpljP1006" 
 #Own udev rule for HP Laserjet P1007
-KERNEL=="lp*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", \
-	ATTRS{product}=="HP LaserJet P1007", NAME="usb/%k", \
-	SYMLINK+="hpljP1007-%n", MODE="0666", RUN+="/etc/hotplug/usb/hpljP1007" 
+ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", \
+	ATTRS{product}=="HP LaserJet P1007", \
+	SYMLINK+="hpljP1007-%n", RUN+="hpljP1007" 
 #Own udev rule for HP Laserjet P1008
-KERNEL=="lp*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", \
-	ATTRS{product}=="HP LaserJet P1008", NAME="usb/%k", \
-	SYMLINK+="hpljP1008-%n", MODE="0666", RUN+="/etc/hotplug/usb/hpljP1008" 
+ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", \
+	ATTRS{product}=="HP LaserJet P1008", \
+	SYMLINK+="hpljP1008-%n", RUN+="hpljP1008" 
 #Own udev rule for HP Laserjet P1505
-KERNEL=="lp*", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", \
-	ATTRS{product}=="HP LaserJet P1505", NAME="usb/%k", \
-	SYMLINK+="hpljP1505-%n", MODE="0666", RUN+="/etc/hotplug/usb/hpljP1505" 
+ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", \
+	ATTRS{product}=="HP LaserJet P1505", \
+	SYMLINK+="hpljP1505-%n", RUN+="hpljP1505" 
+#Own udev rule for HP Laserjet P1505n
+ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="03f0", \
+	ATTRS{product}=="HP LaserJet P1505n", \
+	SYMLINK+="hpljP1505n-%n", RUN+="hpljP1505n"