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>
https://bugzilla.novell.com/show_bug.cgi?id=481794

User Ulrich.Windl@xxxxxxxxxxxxxxxxxxxx added comment
https://bugzilla.novell.com/show_bug.cgi?id=481794#c7





--- Comment #7 from Ulrich Windl <Ulrich.Windl@xxxxxxxxxxxxxxxxxxxx>
2009-03-25 07:49:40 MST ---
(In reply to comment #6)
/usr/lib/pm-utils/sleep.d/

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
hibernate|suspend)
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
do
#echo "Server is still running -- waiting"
sleep 1
done

(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,
BTW.

;;
thaw|resume)
restartservice cups
;;
*)
;;
esac

exit $?

--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
< Previous Next >
References