https://bugzilla.novell.com/show_bug.cgi?id=481794 User Ulrich.Windl@rz.uni-regensburg.de added comment https://bugzilla.novell.com/show_bug.cgi?id=481794#c7 --- Comment #7 from Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> 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.