Thanks Simon,I think my question got a bit lost amongst all the grub issues - does anyone else have information about whether any references to syslog.target in systemd unit files can be removed?ChrisSent from Samsung Mobile on O2
-------- Original message -------- From: Simon Matter via CentOS centos@centos.org Date: 31/07/2020 10:02 (GMT+00:00) To: CentOS mailing list centos@centos.org Subject: Re: [CentOS] systemd syslog.target
Hi,>> I've noticed that there are several systemd unit files in CentOS 7 and 8> with the optionAfter=syslog.targetin the [Unit] section, but since systemd> version 198 syslog.target has not existed.I deduce from this that> "After=syslog.target" is ignored by systemd and can therefore be removed.> Is this correct? I am writing some systemd unit files for our own services> which previously used init.d scripts, so I want to ensure I'm not causing> problems by omitting "After=syslog.target"ChrisSent from Samsung Mobile on> O2Interesting, there is really no syslog.target on either CentOS 7 or 8. Butif a service needs classic syslog, shouldn't it have another After=instead?Simon_______________________________________________CentOS mailing listCentOS@centos.orghttps://lists.centos.org/mailman/listinfo/centos
Hi,
if I get it correctly [1] it is not recommended to use After=syslog but it's not forbidden. But as the syslog.service should not be enabled it is not running anyway. As the man page states:
"If a unit foo.service contains a setting Before=bar.service and both units are being started, bar.service's start-up is delayed until foo.service is started up. Note that this setting is independent of and orthogonal to the requirement dependencies as configured by Requires=" [2]
it should have no effect including this after even if it's not necessary.
I Would recommend not including the After as it's somehow deprecated since systemd v38 (January 2012!).
The only effect you may observe is that if syslog.service is started through socket activation your service might be delayed starting up resulting in an non-optimal startup time. However, this might take some ms barely anyone would notice that.
best regards Markus
[1] https://www.freedesktop.org/wiki/Software/systemd/syslog/ [2] https://www.freedesktop.org/software/systemd/man/systemd.unit.html
On Tue, 2020-08-11 at 09:15 +0100, ctcard wrote:
Thanks Simon,I think my question got a bit lost amongst all the grub issues - does anyone else have information about whether any references to syslog.target in systemd unit files can be removed?ChrisSent from Samsung Mobile on O2
-------- Original message -------- From: Simon Matter via CentOS centos@centos.org Date: 31/07/2020 10:02 (GMT+00:00) To: CentOS mailing list centos@centos.org Subject: Re: [CentOS] systemd syslog.target
Hi,>> I've noticed that there are several systemd unit files in CentOS 7 and 8> with the optionAfter=syslog.targetin the [Unit] section, but since systemd> version 198 syslog.target has not existed.I deduce from this that> "After=syslog.target" is ignored by systemd and can therefore be removed.> Is this correct? I am writing some systemd unit files for our own services> which previously used init.d scripts, so I want to ensure I'm not causing> problems by omitting "After=syslog.target"ChrisSent from Samsung Mobile on> O2Interesting, there is really no syslog.target on either CentOS 7 or 8. Butif a service needs classic syslog, shouldn't it have another After=instead?Simon_______________________________________________Cen tOS mailing listCentOS@centos.org https://lists.centos.org/mailman/listinfo/centos _______________________________________________ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos