packages: syslog-ng/syslog-ng.spec - do not restart the upstart service twice

jajcus jajcus at pld-linux.org
Tue May 11 17:50:56 CEST 2010


Author: jajcus                       Date: Tue May 11 15:50:55 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- do not restart the upstart service twice

---- Files affected:
packages/syslog-ng:
   syslog-ng.spec (1.186 -> 1.187) 

---- Diffs:

================================================================
Index: packages/syslog-ng/syslog-ng.spec
diff -u packages/syslog-ng/syslog-ng.spec:1.186 packages/syslog-ng/syslog-ng.spec:1.187
--- packages/syslog-ng/syslog-ng.spec:1.186	Mon May 10 17:17:06 2010
+++ packages/syslog-ng/syslog-ng.spec	Tue May 11 17:50:50 2010
@@ -11,7 +11,7 @@
 Summary(pt_BR.UTF-8):	Daemon de log nova geração
 Name:		syslog-ng
 Version:	3.0.5
-Release:	3
+Release:	3.6
 License:	GPL v2
 Group:		Daemons
 Source0:	http://www.balabit.com/downloads/files/syslog-ng/sources/%{version}/source/%{name}_%{version}.tar.gz
@@ -82,15 +82,15 @@
 	if [ -f /var/lock/subsys/"%1" ] ; then \
 		/sbin/service --no-upstart "%1" stop \
 		/sbin/service "%1" start \
-	else \
-		/sbin/service "%1" try-restart \
 	fi
 
 # restart the job after upgrade or migrate to init script on removal
+# cannot be stopped with 'service' as /etc/init/$name.conf may be missing
+# at this point
 %define	upstart_postun() \
 	if [ -x /sbin/initctl ] && /sbin/initctl status "%1" 2>/dev/null | grep -q 'running' ; then \
-		/sbin/initctl stop "%1" 2>/dev/null \
-		[ -f "/etc/rc.d/init.d/%1" -o -f "/etc/init/%1.conf" ] && /sbin/service "%1" start \
+		/sbin/initctl stop "%1" >/dev/null 2>&1 \
+		[ -f "/etc/rc.d/init.d/%1" -o -f "/etc/init/%1.conf" ] && { echo -n "Re-" ; /sbin/service "%1" start ; } ; \
 	fi
 
 %description
@@ -243,6 +243,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.187  2010/05/11 15:50:50  jajcus
+- do not restart the upstart service twice
+
 Revision 1.186  2010/05/10 15:17:06  jajcus
 - Release: 3
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/syslog-ng/syslog-ng.spec?r1=1.186&r2=1.187&f=u



More information about the pld-cvs-commit mailing list