Mailinglist Archive: opensuse-bugs (7195 mails)

< Previous Next >
[Bug 481794] CUPS print job stalled after suspend/resume
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Wed, 25 Mar 2009 07:49:41 -0600 (MDT)
  • Message-id: <20090325134941.75644CC7D1@xxxxxxxxxxxxxxxxxxxxxx>

User Ulrich.Windl@xxxxxxxxxxxxxxxxxxxx added comment

--- Comment #7 from Ulrich Windl <Ulrich.Windl@xxxxxxxxxxxxxxxxxxxx>
2009-03-25 07:49:40 MST ---
(In reply to comment #6)

Shouldn't that be better located in /var or /etc, because /usr might be
read-only? The files in package pm-utils are not flagged as "configuration
files" BTW...

While I'm trying your proposal, let me note:
case "$1" in
stopservice cups
sleep 3

While we lack an equivalent for "[cups]disable -a" (disable all printers) here,
and "[cups]enable -a" (enable all printers, or better those that were disabled
before), this solution might be preferrable to "sleep 3":

while /usr/bin/lpstat >/dev/null 2>&1
#echo "Server is still running -- waiting"
sleep 1

(When there are no jobs queued or printing, the command returns nothing; if the
server is down it returns an error ("lpstat: Verbindung zum Server nicht
möglich" in Germany); otherwise it returns a list of print jobs)

Your "sleep 3" will usually return a success code, even if the stop failed,

restartservice cups

exit $?

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.
< Previous Next >