lpstat should return failure when cupsd is not running
Bug #814908 reported by
Benjamin Kaduk
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cups (Ubuntu) |
Expired
|
Wishlist
|
Unassigned |
Bug Description
We find ourselves needing to programmatically check whether cupsd is running (so that we can use lpadmin to add our site's printers for our users, but there are many other possible reasons one might want to do this). 'lpstat -r' seems the obvious way to do so, but the command always returns zero (success).
Thus, we are forced to parse the text output of 'lpstat -r', which is quite fragile to that text changing in a future release. 'lpstat -r' should return nonzero when cupsd is not running, allowing for a robust determination of whether cupsd is running (and thus other commands will fail).
This bug was observed in natty, with cups 1.4.6-5ubuntu1.3
To post a comment you must log in.
Checking for presence of the file /var/run/ cups/cupsd. pid to find out if cups is running is more robust in my opinion.
Anyway if you think lpstat -r needs to return nonzero value if cups isn't running this should be reported upstream to CUPS here: www.cups. org/str. php
http://
Please also add a link to the upstream str in this bug report.