packages: syslog-ng/syslog-ng.init - flush-logs: invoke systemd in systemd ...

glen glen at pld-linux.org
Sat Mar 31 13:01:04 CEST 2012


Author: glen                         Date: Sat Mar 31 11:01:04 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- flush-logs: invoke systemd in systemd mode; use rc-scripts messages

---- Files affected:
packages/syslog-ng:
   syslog-ng.init (1.40 -> 1.41) 

---- Diffs:

================================================================
Index: packages/syslog-ng/syslog-ng.init
diff -u packages/syslog-ng/syslog-ng.init:1.40 packages/syslog-ng/syslog-ng.init:1.41
--- packages/syslog-ng/syslog-ng.init:1.40	Sat Mar 31 11:22:53 2012
+++ packages/syslog-ng/syslog-ng.init	Sat Mar 31 13:00:59 2012
@@ -107,8 +107,15 @@
 
 flush_logs() {
 	if use_upstart && [ -f /etc/init/syslog-ng.conf ]; then
+		checkconfig
 		/sbin/initctl reload syslog-ng
-	elif [ -f /var/lock/subsys/syslog-ng ] || service syslog-ng status >/dev/null; then
+	elif [ -x /bin/systemd_booted ] && /bin/systemd_booted; then
+		checkconfig
+		msg_reloading "syslog-ng"
+		/bin/systemctl reload syslog-ng.service
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] && ok || fail
+	elif [ -f /var/lock/subsys/syslog-ng ]; then
 		checkconfig
 		msg_reloading "syslog-ng"
 		killproc syslog-ng -HUP
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/syslog-ng/syslog-ng.init?r1=1.40&r2=1.41



More information about the pld-cvs-commit mailing list