rpms/cups/devel cups.spec,1.521,1.522 cups.init,1.21,1.22

Jiří Popelka jpopelka at fedoraproject.org
Wed Sep 23 14:31:50 UTC 2009


Author: jpopelka

Update of /cvs/pkgs/rpms/cups/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3957

Modified Files:
	cups.spec cups.init 
Log Message:
* Wed Sep 23 2009 Jiri Popelka <jpopelka at redhat.com> 1:1.4.1-5
- Fixed cups.init to be LSB compliant (bug #521641)



Index: cups.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cups/devel/cups.spec,v
retrieving revision 1.521
retrieving revision 1.522
diff -u -p -r1.521 -r1.522
--- cups.spec	21 Sep 2009 13:57:36 -0000	1.521
+++ cups.spec	23 Sep 2009 14:31:50 -0000	1.522
@@ -9,7 +9,7 @@
 Summary: Common Unix Printing System
 Name: cups
 Version: 1.4.1
-Release: 4%{?dist}
+Release: 5%{?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,10 @@ rm -rf $RPM_BUILD_ROOT
 %{php_extdir}/phpcups.so
 
 %changelog
+
+* Wed Sep 23 2009 Jiri Popelka <jpopelka at redhat.com> 1:1.4.1-5
+- Fixed cups.init to be LSB compliant (bug #521641)
+
 * Mon Sep 21 2009 Jiri Popelka <jpopelka at 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


Index: cups.init
===================================================================
RCS file: /cvs/pkgs/rpms/cups/devel/cups.init,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -p -r1.21 -r1.22
--- cups.init	21 Sep 2009 13:57:36 -0000	1.21
+++ cups.init	23 Sep 2009 14:31:50 -0000	1.22
@@ -43,23 +43,25 @@
 ### END INIT INFO
 
 # Source function library.
-. /etc/init.d/functions
+. /etc/rc.d/init.d/functions
 
 DAEMON=cupsd
-
+exec=/usr/sbin/cupsd
 prog=cups
+config=/etc/cups/cupsd.conf
+lockfile=/var/lock/subsys/$DAEMON
 
 check() {
 	# Check that we're a privileged user
 	[ `id -u` = 0 ] || exit 4
 	
 	# Check if cupsd is executable
-	[ -x /usr/sbin/cupsd ] || exit 5
+	[ -x $exec ] || exit 5
 }
 
 start () {
 	check
-	[ -f /etc/cups/cupsd.conf ] || exit 6
+	[ -f $config ] || exit 6
 
 	echo -n $"Starting $prog: "
 
@@ -70,7 +72,7 @@ start () {
 	daemon $DAEMON
         RETVAL=$?
 	echo
-	[ $RETVAL = 0 ] && touch /var/lock/subsys/cups
+	[ $RETVAL = 0 ] && touch $lockfile
 
 	udevadm trigger --subsystem-match=usb	\
 		--attr-match=bInterfaceClass=07	\
@@ -89,7 +91,7 @@ stop () {
 	killproc $DAEMON
 	RETVAL=$?
 	echo
-	[ $RETVAL = 0 ] && rm -f /var/lock/subsys/cups
+	[ $RETVAL = 0 ] && rm -f $lockfile
 	return 0
 }
 
@@ -109,7 +111,7 @@ case $1 in
 		restart
 	;;
 	condrestart|try-restart)
-		[ -f /var/lock/subsys/cups ] && restart || :
+		[ -f $lockfile ] && restart || :
 	;;	
 	reload)
 		echo -n $"Reloading $prog: "
@@ -125,7 +127,7 @@ case $1 in
 		echo
 	;;
 	status)
-		status cups
+		status $DAEMON
 		RETVAL=$?
 	;;
 	restartlog)
@@ -135,7 +137,7 @@ case $1 in
 	;;
 	*)
 
-	echo $"Usage: $prog {start|stop|restart|condrestart|reload|status}"
+	echo $"Usage: $prog {start|stop|restart|condrestart|try-restart|reload|force-reload|status}"
 	exit 2
 esac
 




More information about the scm-commits mailing list