Date: Mon, 25 Nov 2002 18:45:50 -0500 From: Garance A Drosihn <drosih@rpi.edu> To: GB Clark <gclarkii@vsservices.com>, freebsd-hackers@FreeBSD.ORG Cc: Peter Elsner <peter@servplex.com> Subject: Re: Fw: lpd and lprm broken? Message-ID: <p05200f0eba08639e31e8@[128.113.24.47]> In-Reply-To: <20021125160202.05d75190.gclarkii@vsservices.com> References: <20021125160202.05d75190.gclarkii@vsservices.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11/25/02, Peter Elsner <peter@servplex.com> 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 = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p05200f0eba08639e31e8>