Systemd Syslog.target

Home » CentOS » Systemd Syslog.target
CentOS 3 Comments

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 O2

3 thoughts on - Systemd Syslog.target

  • Hi,

    Interesting, there is really no syslog.target on either CentOS 7 or 8. But if a service needs classic syslog, shouldn’t it have another After=
    instead?

    Simon

  • 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
    Date: 31/07/2020 10:02 (GMT+00:00)
    To: CentOS mailing list
    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