rsyslog/rsyslog-unit.patch
Marcus Meissner 12102b31df Accepting request 178930 from home:elvigia:branches:Base:System
- Required version of pkgconfig(relp) is >= 1.0.3
- Requires version of libsystemd-journal is >= 197
- Notify systemd on sucessful startup of the daemon to avoid
  confusing behaviour such as :
  http://lists.opensuse.org/opensuse/2013-06/msg00603.html

OBS-URL: https://build.opensuse.org/request/show/178930
OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=150
2013-06-14 12:15:46 +00:00

34 lines
880 B
Diff

--- rsyslog-7.3.14.orig/rsyslog.service.in
+++ rsyslog-7.3.14/rsyslog.service.in
@@ -1,9 +1,17 @@
[Unit]
Description=System Logging Service
+Requires=var-run.mount
+Requires=syslog.socket
+After=var-run.mount
+Conflicts=syslog-ng.service syslogd.service
[Service]
-ExecStart=@sbindir@/rsyslogd -n
-Sockets=syslog.socket
+Type=notify
+Environment=RSYSLOGD_PARAMS=
+ExecStartPre=@sbindir@/rsyslog-service-prepare
+EnvironmentFile=-/etc/sysconfig/syslog
+ExecStart=@sbindir@/rsyslogd -n $RSYSLOGD_PARAMS
+ExecReload=/bin/kill -HUP $MAINPID
StandardOutput=null
[Install]
--- rsyslog-7.3.14.orig/tools/syslogd.c
+++ rsyslog-7.3.14/tools/syslogd.c
@@ -2033,7 +2033,7 @@ int realMain(int argc, char **argv)
close(2);
ourConf->globals.bErrMsgToStderr = 0;
}
-
+ sd_notify(0, "READY=1");
mainloop();
/* do any de-init's that need to be done AFTER this comment */