package/sysklogd: add systemd services

Sysklogd had only SYSV init scripts. Add systemd service files to start
klogd and syslogd.

Signed-off-by: Petr Kulhavy <brain@jikos.cz>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
Petr Kulhavy 2017-09-20 12:21:30 +02:00 committed by Arnout Vandecappelle (Essensium/Mind)
parent 0f8163a5ca
commit 7420614937
3 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,11 @@
[Unit]
Description=Kernel Log Daemon
[Service]
ExecStart=/usr/sbin/klogd -n
StandardOutput=null
Restart=on-failure
[Install]
WantedBy=multi-user.target
WantedBy=syslogd.service

View file

@ -32,4 +32,16 @@ define SYSKLOGD_INSTALL_INIT_SYSV
$(TARGET_DIR)/etc/init.d/S01logging
endef
define SYSKLOGD_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 $(SYSKLOGD_PKGDIR)/syslogd.service \
$(TARGET_DIR)/usr/lib/systemd/system/syslogd.service
$(INSTALL) -D -m 644 $(SYSKLOGD_PKGDIR)/klogd.service \
$(TARGET_DIR)/usr/lib/systemd/system/klogd.service
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -sf ../../../../usr/lib/systemd/system/syslogd.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/syslogd.service
ln -sf ../../../usr/lib/systemd/system/syslogd.service \
$(TARGET_DIR)/etc/systemd/system/syslog.service
endef
$(eval $(generic-package))

View file

@ -0,0 +1,13 @@
[Unit]
Description=System Logging Service
Requires=syslog.socket
Wants=klogd.service
[Service]
ExecStart=/usr/sbin/syslogd -m 0 -n
StandardOutput=null
Restart=on-failure
[Install]
WantedBy=multi-user.target
Alias=syslog.service