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)

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

Revision history for this message
Pascal De Vuyst (pascal-devuyst) wrote :

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:
Please also add a link to the upstream str in this bug report.

Changed in cups (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
tags: added: needs-upstream-report
Revision history for this message
gf (gf-interlinks-deactivatedaccount) wrote :

Hello Benjamin,
Thank you for submitting this feature/enhancement request for the cups package. You made this request quite some time ago and Ubuntu has been updated since then.

Do you think this feature/enhancement is still needed or can we close this bug report?

Thank you again for helping make Ubuntu better.
[Ubuntu Bug Squad volunteer triager]

Changed in cups (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for cups (Ubuntu) because there has been no activity for 60 days.]

Changed in cups (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers