- Changed cups.init to be LSB compliant (bug #521641), i.e. return code "2"

(instead of "3") if invalid arguments return code "4" if restarting
    service under nonprivileged user return code "5" if cupsd not exist or
    is not executable return code "6" if cupsd.conf not exist
This commit is contained in:
Jiří Popelka 2009-09-21 13:57:36 +00:00
parent 7aabe54edc
commit 3f10348a3f
2 changed files with 22 additions and 2 deletions

View File

@ -49,7 +49,18 @@ DAEMON=cupsd
prog=cups
check() {
# Check that we're a privileged user
[ `id -u` = 0 ] || exit 4
# Check if cupsd is executable
[ -x /usr/sbin/cupsd ] || exit 5
}
start () {
check
[ -f /etc/cups/cupsd.conf ] || exit 6
echo -n $"Starting $prog: "
# tell portreserve to release the port
@ -71,6 +82,8 @@ start () {
}
stop () {
check
# stop daemon
echo -n $"Stopping $prog: "
killproc $DAEMON
@ -123,7 +136,7 @@ case $1 in
*)
echo $"Usage: $prog {start|stop|restart|condrestart|reload|status}"
exit 3
exit 2
esac
exit $RETVAL

View File

@ -9,7 +9,7 @@
Summary: Common Unix Printing System
Name: cups
Version: 1.4.1
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source: http://ftp.easysw.com/pub/cups/1.4.0/cups-%{version}-source.tar.bz2
@ -505,6 +505,13 @@ rm -rf $RPM_BUILD_ROOT
%{php_extdir}/phpcups.so
%changelog
* Mon Sep 21 2009 Jiri Popelka <jpopelka@redhat.com> 1:1.4.1-4
- Changed cups.init to be LSB compliant (bug #521641), i.e.
return code "2" (instead of "3") if invalid arguments
return code "4" if restarting service under nonprivileged user
return code "5" if cupsd not exist or is not executable
return code "6" if cupsd.conf not exist
* Wed Sep 16 2009 Tomas Mraz <tmraz@redhat.com> 1:1.4.1-3
- Use password-auth common PAM configuration instead of system-auth
when available.