Line
Link Here
|
0 |
-- work/foo2zjs/foo2zjs-loadfw |
0 |
++ work/foo2zjs/foo2zjs-loadfw |
Lines 2-8
Link Here
|
2 |
|
2 |
|
3 |
# foo2zjs-loadfw: |
3 |
# foo2zjs-loadfw: |
4 |
# |
4 |
# |
5 |
# Hotplug script for HP1000/1005/1020 USB laser printers. The model number |
5 |
# Hotplug script for 100[05],1018,1020,P100[5678],P1505,P1505n |
|
|
6 |
# USB laser printers. The model number |
6 |
# that this script deals with is determined from the udev env. |
7 |
# that this script deals with is determined from the udev env. |
7 |
# |
8 |
# |
8 |
# Used to download firmware automatically into the printer when it |
9 |
# Used to download firmware automatically into the printer when it |
Lines 19-25
Link Here
|
19 |
FWDIR=/lib/firmware |
20 |
FWDIR=/lib/firmware |
20 |
|
21 |
|
21 |
# |
22 |
# |
22 |
# Program used to determine USB id information |
23 |
# Program used to determine USB printer id information |
23 |
# |
24 |
# |
24 |
USBID=/bin/usb_printerid |
25 |
USBID=/bin/usb_printerid |
25 |
|
26 |
|
Lines 49-79
Link Here
|
49 |
fi |
50 |
fi |
50 |
|
51 |
|
51 |
# |
52 |
# |
52 |
# Figure out the model number from the name of this script |
53 |
# Figure out the model number from the argument of this script |
53 |
# |
54 |
# |
|
|
55 |
MODELNAME='' |
56 |
FWMODEL='' |
54 |
case "$1" in |
57 |
case "$1" in |
|
|
58 |
P1005) |
59 |
MODEL=P1005 |
60 |
;; |
61 |
P1006) |
62 |
MODEL=P1006 |
63 |
;; |
64 |
P1007) |
65 |
MODEL=P1007 |
66 |
FWMODEL=P1005 |
67 |
;; |
68 |
P1008) |
69 |
MODEL=P1008 |
70 |
FWMODEL=P1006 |
71 |
;; |
72 |
P1505) |
73 |
MODEL=P1505 |
74 |
;; |
75 |
P1505n) |
76 |
MODEL=P1505n |
77 |
FWMODEL=P1505 |
78 |
;; |
55 |
1000) |
79 |
1000) |
56 |
MODEL=1000 |
80 |
MODEL=1000 |
57 |
MODELNAME="hp LaserJet $MODEL" |
81 |
MODELNAME="hp LaserJet $MODEL" |
58 |
;; |
82 |
;; |
59 |
1005) |
83 |
1005) |
60 |
MODEL=1005 |
84 |
MODEL=1005 |
61 |
MODELNAME="hp LaserJet $MODEL" |
85 |
MODELNAME="hp LaserJet $MODEL" |
62 |
;; |
86 |
;; |
63 |
1018) |
87 |
1018) |
64 |
MODEL=1018 |
88 |
MODEL=1018 |
65 |
MODELNAME="HP LaserJet $MODEL" |
89 |
;; |
66 |
;; |
|
|
67 |
1020) |
90 |
1020) |
68 |
MODEL=1020 |
91 |
MODEL=1020 |
69 |
MODELNAME="HP LaserJet $MODEL" |
92 |
;; |
70 |
;; |
|
|
71 |
*) |
93 |
*) |
72 |
log "Only HP LaserJet 1000, 1005, 1018 and 1020 are supported" |
94 |
log "Only HP LaserJet 100[05],1018,1020,P100[5678],P1505,P1505n are supported" |
73 |
log "You need to supply one of these on the cmdline: $0 10**" |
95 |
log "You need to supply one of these on the cmdline: $0 10**" |
74 |
exit |
96 |
exit |
75 |
;; |
97 |
;; |
76 |
esac |
98 |
esac |
|
|
99 |
: ${MODELNAME:="HP LaserJet $MODEL"} |
100 |
: ${FWMODEL:="$MODEL"} |
77 |
|
101 |
|
78 |
if [ -n "$2" ]; then |
102 |
if [ -n "$2" ]; then |
79 |
DEVNAME=$2 |
103 |
DEVNAME=$2 |
Lines 89-95
Link Here
|
89 |
# Procedure to load a single device with firmware |
112 |
# Procedure to load a single device with firmware |
90 |
# |
113 |
# |
91 |
load1() { |
114 |
load1() { |
92 |
fw="$FWDIR/sihp$MODEL.dl" |
115 |
fw="$FWDIR/sihp$FWMODEL.dl" |
93 |
if [ ! -f "$fw" ]; then |
116 |
if [ ! -f "$fw" ]; then |
94 |
log "Missing HP LaserJet $MODEL firmware file $fw" |
117 |
log "Missing HP LaserJet $MODEL firmware file $fw" |
95 |
log "...read foo2zjs installation instructions and run ./getweb $MODEL" |
118 |
log "...read foo2zjs installation instructions and run ./getweb $MODEL" |
96 |
-- work/foo2zjs/hplj10xx.rules |
119 |
++ work/foo2zjs/hplj10xx.rules |
Lines 1-4
Link Here
|
1 |
ACTION=="add", KERNEL=="lp*", SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", \ |
1 |
ACTION=="add", KERNEL=="lp*", SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", \ |
|
|
2 |
ATTRS{idProduct}=="3d17", RUN+="/sbin/foo2zjs-loadfw P1005 $tempnode" |
3 |
ACTION=="add", KERNEL=="lp*", SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", \ |
4 |
ATTRS{idProduct}=="3e17", RUN+="/sbin/foo2zjs-loadfw P1006 $tempnode" |
5 |
ACTION=="add", KERNEL=="lp*", SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", \ |
6 |
ATTRS{idProduct}=="4817", RUN+="/sbin/foo2zjs-loadfw P1007 $tempnode" |
7 |
ACTION=="add", KERNEL=="lp*", SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", \ |
8 |
ATTRS{idProduct}=="4917", RUN+="/sbin/foo2zjs-loadfw P1008 $tempnode" |
9 |
ACTION=="add", KERNEL=="lp*", SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", \ |
10 |
ATTRS{idProduct}=="3f17", RUN+="/sbin/foo2zjs-loadfw P1505 $tempnode" |
11 |
ACTION=="add", KERNEL=="lp*", SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", \ |
12 |
ATTRS{idProduct}=="4017", RUN+="/sbin/foo2zjs-loadfw P1505n $tempnode" |
13 |
ACTION=="add", KERNEL=="lp*", SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", \ |
2 |
ATTRS{idProduct}=="0517", RUN+="/sbin/foo2zjs-loadfw 1000 $tempnode" |
14 |
ATTRS{idProduct}=="0517", RUN+="/sbin/foo2zjs-loadfw 1000 $tempnode" |
3 |
ACTION=="add", KERNEL=="lp*", SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", \ |
15 |
ACTION=="add", KERNEL=="lp*", SUBSYSTEM=="usb", ATTRS{idVendor}=="03f0", \ |
4 |
ATTRS{idProduct}=="1317", RUN+="/sbin/foo2zjs-loadfw 1005 $tempnode" |
16 |
ATTRS{idProduct}=="1317", RUN+="/sbin/foo2zjs-loadfw 1005 $tempnode" |