Fw: lpd and lprm broken?
Forwarding this for a friend that can't get mail to the list. GB Begin forwarded message: Date: Mon, 25 Nov 2002 15:56:33 -0600 From: Peter Elsner [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: lpd and lprm broken? Hello All... Something appears to be broken with lpq and lprm. I'm writing a Perl script to easily allow users to manage printers/jobs from a easy to use interface. 1st problem (lpq): man lpq displays the use as follows: NAME lpq - spool queue examination program SYNOPSIS lpq [-a] [-l] [-Pprinter] [job # ...] [user ...] lpq -a (works fine) lpq -l (doesn't return anything) lpq -Pprinter (works fine) lpq job# and lpq user (don't work). Examples follow: spxdev:root# lpq -a lsjd1p2: spxdev.servplex.com: Warning: lsjd1p2 is down: spxdev.servplex.com: Warning: no daemon present Rank Owner Job Files Total Size 1stpeter 13 (standard input) 785 bytes (LPD Server): spxdev:root# lpq -l (LPD Server): spxdev:root# lpq -Plsjd1p2 spxdev.servplex.com: Warning: lsjd1p2 is down: spxdev.servplex.com: Warning: no daemon present Rank Owner Job Files Total Size 1stpeter 13 (standard input) 785 bytes (LPD Server): spxdev:root# lpq 13 (LPD Server): spxdev:root# lpq peter (LPD Server): spxdev:root# 2nd problem (lprm): man lprm displays the use as follows: NAME lprm - remove jobs from the line printer spooling queue SYNOPSIS lprm [-Pprinter] [-] [job # ...] [user ...] lprm -Plsjd1p2 (none of the above work at all) spxdev:root# lprm -Plsjd1p2 (LPD Server): Cancel Function Not Supported spxdev:root# lprm - (LPD Server): Cancel Function Not Supported spxdev:root# lprm 13 (LPD Server): Cancel Function Not Supported spxdev:root# lprm peter (LPD Server): Cancel Function Not Supported spxdev:root# Now, it does work if (and only if) I enter the following: lprm -Plsjd1p2 13 spxdev:root# lprm -Plsjd1p2 13 dfA013spxdev.servplex.com dequeued cfA013spxdev.servplex.com dequeued (LPD Server): Cancel Function Not Supported spxdev:root# It does actually remove the print job but still gives the Cancel Function Not Supported message... System is 4.7-STABLE. and I went back to another server that is running 4.4-STABLE and got the same results which indicates that this has been broken for some time. Any help or insight anyone might be able to provide, would be greatly appreciated. Thanks in advance, Peter Elsner -- Peter Elsner [EMAIL PROTECTED] Vice President Of Customer Service (And System Administrator) 1835 S. Carrier Parkway Grand Prairie, Texas 75051 (972) 263-2080 - Voice (972) 263-2082 - Fax (972) 489-4838 - Cell Phone (425) 988-8061 - eFax I worry about my child and the Internet all the time, even though she's too young to have logged on yet. Here's what I worry about. I worry that 10 or 15 years from now, she will come to me and say Daddy, where were you when they took freedom of the press away from the Internet? -- Mike Godwin Unix IS user friendly... It's just selective about who its friends are. System Administration - It's a dirty job, but somebody said I had to do it. If you receive something that says 'Send this to everyone you know, pretend you don't know me. Standard $500/message proofreading fee applies for UCE. -- GB Clark II | Roaming FreeBSD Admin [EMAIL PROTECTED] | General Geek CTHULU for President - Why choose the lesser of two evils? To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: Fw: lpd and lprm broken?
On 11/25/02, Peter Elsner [EMAIL PROTECTED] wanted to know: Hello All... Something appears to be broken with lpq and lprm. I'm writing a Perl script to easily allow users to manage printers/jobs from a easy to use interface. 1st problem (lpq): man lpq displays the use as follows: NAME lpq - spool queue examination program SYNOPSIS lpq [-a] [-l] [-Pprinter] [job # ...] [user ...] lpq -a (works fine) lpq -l (doesn't return anything) lpq -Pprinter (works fine) lpq job# and lpq user (don't work). 'lpq -a' will check all local printer queues for any queues which have jobs waiting for them. It is the only option which checks all queues. If you do not specify '-a', then lpq will check only one queue for print jobs. By default, that single queue will be the one named 'lp', unless you have defined and exported the environment variable PRINTER. In that case, it will check whatever single queue is specified by PRINTER. The same is true for 'lprm'. It will only look at one single queue for the job or jobs that you are trying to remove. Now, it does work if (and only if) I enter the following: lprm -Plsjd1p2 13 spxdev:root# lprm -Plsjd1p2 13 dfA013spxdev.servplex.com dequeued cfA013spxdev.servplex.com dequeued (LPD Server): Cancel Function Not Supported spxdev:root# It does actually remove the print job but still gives the Cancel Function Not Supported message... The Cancel Function Not Supported message does not come from lprm or lpd. The queue named lsjd1p2 is probably pointing at some remote machine (either the printer itself, or maybe a print server that is between you and the printer). Given the look of that error message, I would guess that you're talking to the printer itself, or an LPD server which is running on some flavor of Windows. When removing jobs, lpd first removes any jobs on the local machine which match the criteria you gave. It then sends the exact same criteria on to the remote host, so it can delete any jobs which match your request. In this case, the local host was able to delete the one job, and when it asked the remote machine to delete the same job, the remote machine said that it does not support the cancelling of any jobs. -- Garance Alistair Drosehn= [EMAIL PROTECTED] Senior Systems Programmer or [EMAIL PROTECTED] Rensselaer Polytechnic Instituteor [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message