summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/sysklogd/files/klogd.service13
-rw-r--r--meta/recipes-extended/sysklogd/files/syslogd.service14
-rw-r--r--meta/recipes-extended/sysklogd/files/tmpfiles.sysklogd.conf1
-rw-r--r--meta/recipes-extended/sysklogd/sysklogd.inc21
4 files changed, 47 insertions, 2 deletions
diff --git a/meta/recipes-extended/sysklogd/files/klogd.service b/meta/recipes-extended/sysklogd/files/klogd.service
new file mode 100644
index 0000000000..0c888c497d
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/klogd.service
@@ -0,0 +1,13 @@
1[Unit]
2Description=Kernel Logging Service
3After=syslogd.service
4
5[Service]
6Type=forking
7ExecStart=/sbin/klogd
8PIDFile=/var/run/klogd.pid
9StandardOutput=null
10Restart=on-failure
11
12[Install]
13WantedBy=multi-user.target
diff --git a/meta/recipes-extended/sysklogd/files/syslogd.service b/meta/recipes-extended/sysklogd/files/syslogd.service
new file mode 100644
index 0000000000..eeaff3d38d
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/syslogd.service
@@ -0,0 +1,14 @@
1[Unit]
2Description=System Logging Service
3Requires=syslog.socket
4
5[Service]
6Type=forking
7ExecStart=/sbin/syslogd
8PIDFile=/var/run/syslogd.pid
9StandardOutput=null
10Restart=on-failure
11
12[Install]
13WantedBy=multi-user.target
14Alias=syslog.service
diff --git a/meta/recipes-extended/sysklogd/files/tmpfiles.sysklogd.conf b/meta/recipes-extended/sysklogd/files/tmpfiles.sysklogd.conf
new file mode 100644
index 0000000000..f4aecd385b
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/files/tmpfiles.sysklogd.conf
@@ -0,0 +1 @@
p /dev/xconsole 0640 root adm
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
index 5c15ffe8ab..f9af0a4833 100644
--- a/meta/recipes-extended/sysklogd/sysklogd.inc
+++ b/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -11,17 +11,24 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
11 file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \ 11 file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \
12 " 12 "
13 13
14inherit update-rc.d update-alternatives 14inherit update-rc.d update-alternatives systemd
15 15
16SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \ 16SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \
17 file://no-strip-install.patch \ 17 file://no-strip-install.patch \
18 file://0001-Fix-build-with-musl.patch \ 18 file://0001-Fix-build-with-musl.patch \
19 file://sysklogd \ 19 file://sysklogd \
20 file://syslog.conf \ 20 file://syslog.conf \
21 file://syslogd.service \
22 file://klogd.service \
23 file://tmpfiles.sysklogd.conf \
21 " 24 "
22 25
23SRC_URI_append_e500v2 = " file://no-vectorization.patch" 26SRC_URI_append_e500v2 = " file://no-vectorization.patch"
24 27
28SYSTEMD_PACKAGES = "${PN}"
29SYSTEMD_SERVICE_${PN} = "syslogd.service klogd.service"
30SYSTEMD_AUTO_ENABLE = "enable"
31
25INITSCRIPT_NAME = "syslog" 32INITSCRIPT_NAME = "syslog"
26CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}" 33CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}"
27 34
@@ -39,13 +46,23 @@ do_install () {
39 install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf 46 install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf
40 install -d ${D}${sysconfdir}/init.d 47 install -d ${D}${sysconfdir}/init.d
41 install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog 48 install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
49 install -d ${D}${systemd_unitdir}/system
50 install -m 644 ${WORKDIR}/syslogd.service ${D}${systemd_unitdir}/system
51 install -m 644 ${WORKDIR}/klogd.service ${D}${systemd_unitdir}/system
52 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true', 'false', d)}; then
53 install -d ${D}${exec_prefix}/lib/tmpfiles.d
54 install -m 644 ${WORKDIR}/tmpfiles.sysklogd.conf ${D}${exec_prefix}/lib/tmpfiles.d/sysklogd.conf
55 fi
42} 56}
43 57
58FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/sysklogd.conf', '', d)}"
59
44# sysklogd package has no internal systemd support, so we weigh busybox's 60# sysklogd package has no internal systemd support, so we weigh busybox's
45# sysklogd utility over it in case of systemd 61# sysklogd utility over it in case of systemd
46ALTERNATIVE_PRIORITY = "${@bb.utils.contains('DISTRO_FEATURES','systemd','10','100',d)}" 62ALTERNATIVE_PRIORITY = "${@bb.utils.contains('DISTRO_FEATURES','systemd','10','100',d)}"
47 63
48ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf" 64ALTERNATIVE_${PN} = "syslogd klogd syslog-conf \
65 ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','syslog-init','',d)}"
49 66
50ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd" 67ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
51ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd" 68ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd"