can't unlock /dev/lp0
I'm running 2.6.8 kernel with sarge and installed lprng. Print jobs
are put in queue, but nothing happens. The /dev/lp0 gets locked, but
removing /var/spool/lpd/lp/lock.pr does not help.
# lpq
Printer: lp@teufel 'Generic dot-matrix printer entry'
Queue: 1 printable job
Server: pid 5203 active
Unspooler: pid 5204 active
Status: processing 'dfA201teufel.hartford-hwp.com', size 5,
format 'f', IF filter 'lpf' at 16:15:45.833
Rank Owner/ID Pr/Class Job Files Size Time
active brownh@teufel+201 A 201 /opt/tmp/test.txt 5 ...
It turns out that the problem is that /dev/lp0 is busy:
# checkpc -p
Warning - lp: cannot open lp device '/dev/lp0' - Device or resource
busy
# fuser /dev/lp0
/dev/lp0: 5204 5205
$ ps aux | grep 5204
daemon 5204 0.0 0.0 4056 1524 ? Ss 16:15 0:00 lpd
(Worker - Print) 'lp'
$ ps aux | grep 5205
daemon 5205 0.0 0.0 3752 892 ? S 16:15 0:00
/usr/lib/lprng/filters/lpf
-Abrownh@teufel+201 -CA
-D2005-09-01-16:15:45.787
-Ff
-Hteufel.hartford-hwp.com
-J/opt/tmp/test.txt
-N/opt/tmp/test.txt
-Plp -Qlp
-a/var/log/lp-acct -b5
-d/var/spool/lpd/lp
-edfA201teufel.hartford-hwp.com
-f/opt/tmp/test.txt
-hteufel.hartford-hwp.com
-j201 -l66
-nbrownh -sstatus
-t2005-09-01-16:15:45.000
-w80 -x0
-y0 /var/log/lp-acct
brownh 5275 0.0 0.0 1552 520 pts/4 S+ 16:30 0:00 grep 5205
I don't know how to interpret all this.
My /etc/printcap is:
lp|Generic dot-matrix printer entry:\
:lp=/dev/lp0:\
:filter=/usr/lib/lprng/filters/lpf:\
:ifhp=model=lexmark_optra_e312:\
:sd=/var/spool/lpd/lp:\
:af=/var/log/lp-acct:\
:lf=/var/log/lp-errs:\
:pl#66:\
:pw#80:\
:pc#150:\
:mx#0:\
:sh:
The permission situation:
$ ls -l /dev/lp0
crw-rw---- 1 root lp 6, 0 Jul 31 18:54 /dev/lp0
$ cat /etc/group | grep lp
lp:x:7:brownh
--
Haines Brown
KB1GRM
Reply to: