All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/sysklogd: add systemd services
@ 2017-09-20 10:21 Petr Kulhavy
  2017-09-24 14:14 ` Arnout Vandecappelle
  0 siblings, 1 reply; 2+ messages in thread
From: Petr Kulhavy @ 2017-09-20 10:21 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Petr Kulhavy <brain@jikos.cz>
---
 package/sysklogd/klogd.service   | 11 +++++++++++
 package/sysklogd/sysklogd.mk     | 12 ++++++++++++
 package/sysklogd/syslogd.service | 13 +++++++++++++
 3 files changed, 36 insertions(+)
 create mode 100644 package/sysklogd/klogd.service
 create mode 100644 package/sysklogd/syslogd.service

diff --git a/package/sysklogd/klogd.service b/package/sysklogd/klogd.service
new file mode 100644
index 0000000..c66795b
--- /dev/null
+++ b/package/sysklogd/klogd.service
@@ -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
diff --git a/package/sysklogd/sysklogd.mk b/package/sysklogd/sysklogd.mk
index e1f0c34..1c8259a 100644
--- a/package/sysklogd/sysklogd.mk
+++ b/package/sysklogd/sysklogd.mk
@@ -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))
diff --git a/package/sysklogd/syslogd.service b/package/sysklogd/syslogd.service
new file mode 100644
index 0000000..70e4cff
--- /dev/null
+++ b/package/sysklogd/syslogd.service
@@ -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
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH 1/1] package/sysklogd: add systemd services
  2017-09-20 10:21 [Buildroot] [PATCH 1/1] package/sysklogd: add systemd services Petr Kulhavy
@ 2017-09-24 14:14 ` Arnout Vandecappelle
  0 siblings, 0 replies; 2+ messages in thread
From: Arnout Vandecappelle @ 2017-09-24 14:14 UTC (permalink / raw)
  To: buildroot



On 20-09-17 12:21, Petr Kulhavy wrote:
> Sysklogd had only SYSV init scripts. Add systemd service filesto start klogd
> and syslogd.
> 
> Signed-off-by: Petr Kulhavy <brain@jikos.cz>

 Applied to master, thanks.

 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-24 14:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-20 10:21 [Buildroot] [PATCH 1/1] package/sysklogd: add systemd services Petr Kulhavy
2017-09-24 14:14 ` Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.