summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorBian Naimeng <biannm@cn.fujitsu.com>2015-02-15 14:45:56 +0800
committerMartin Jansa <Martin.Jansa@gmail.com>2015-02-27 09:35:51 +0100
commitbea242bbeed7a635da5175550083a197d7b91bcf (patch)
tree4dc091e4ea7cef64a7180381a0e7264de1611ecb /meta-oe
parent728cc037c38933f25d086638ebd52bcaa8c8aa3b (diff)
downloadmeta-openembedded-bea242bbeed7a635da5175550083a197d7b91bcf.tar.gz
lmsensors: add systemd supported.
Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-support/lm_sensors/lmsensors/sensord.service11
-rw-r--r--meta-oe/recipes-support/lm_sensors/lmsensors_3.3.5.bb19
2 files changed, 28 insertions, 2 deletions
diff --git a/meta-oe/recipes-support/lm_sensors/lmsensors/sensord.service b/meta-oe/recipes-support/lm_sensors/lmsensors/sensord.service
new file mode 100644
index 000000000..4836d8ff0
--- /dev/null
+++ b/meta-oe/recipes-support/lm_sensors/lmsensors/sensord.service
@@ -0,0 +1,11 @@
1[Unit]
2Description=Sensor Information Logging
3
4[Service]
5Type=forking
6EnvironmentFile=-@SYSCONFDIR@/sensord.conf
7PIDFile=@LOCALSTATEDIR@/run/sensord.pid
8ExecStart=@SBINDIR@/sensord $SENSORD_ARGS
9
10[Install]
11WantedBy=multi-user.target
diff --git a/meta-oe/recipes-support/lm_sensors/lmsensors_3.3.5.bb b/meta-oe/recipes-support/lm_sensors/lmsensors_3.3.5.bb
index 113c6fccf..d2cd31716 100644
--- a/meta-oe/recipes-support/lm_sensors/lmsensors_3.3.5.bb
+++ b/meta-oe/recipes-support/lm_sensors/lmsensors_3.3.5.bb
@@ -10,11 +10,12 @@ DEPENDS = "sysfsutils virtual/libiconv bison-native flex-native rrdtool"
10SRC_URI = "http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-${PV}.tar.bz2 \ 10SRC_URI = "http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-${PV}.tar.bz2 \
11 file://fancontrol.init \ 11 file://fancontrol.init \
12 file://sensord.init \ 12 file://sensord.init \
13 file://sensord.service \
13" 14"
14SRC_URI[md5sum] = "da506dedceb41822e64865f6ba34828a" 15SRC_URI[md5sum] = "da506dedceb41822e64865f6ba34828a"
15SRC_URI[sha256sum] = "5dae6a665e1150159a93743c4ff1943a7efe02cd9d3bb12c4805e7d7adcf4fcf" 16SRC_URI[sha256sum] = "5dae6a665e1150159a93743c4ff1943a7efe02cd9d3bb12c4805e7d7adcf4fcf"
16 17
17inherit update-rc.d 18inherit update-rc.d systemd
18 19
19RDEPENDS_${PN}-dev = "" 20RDEPENDS_${PN}-dev = ""
20 21
@@ -24,6 +25,10 @@ INITSCRIPT_NAME_${PN}-sensord = "sensord"
24INITSCRIPT_PARAMS_${PN}-fancontrol = "defaults 66" 25INITSCRIPT_PARAMS_${PN}-fancontrol = "defaults 66"
25INITSCRIPT_PARAMS_${PN}-sensord = "defaults 67" 26INITSCRIPT_PARAMS_${PN}-sensord = "defaults 67"
26 27
28SYSTEMD_PACKAGES = "${PN}-sensord"
29SYSTEMD_SERVICE_${PN}-sensord = "sensord.service"
30SYSTEMD_AUTO_ENABLE = "disable"
31
27S = "${WORKDIR}/lm_sensors-${PV}" 32S = "${WORKDIR}/lm_sensors-${PV}"
28 33
29EXTRA_OEMAKE = 'LINUX=${STAGING_KERNEL_DIR} EXLDFLAGS="${LDFLAGS}" \ 34EXTRA_OEMAKE = 'LINUX=${STAGING_KERNEL_DIR} EXLDFLAGS="${LDFLAGS}" \
@@ -49,6 +54,16 @@ do_install() {
49 54
50 # Install sensord init script 55 # Install sensord init script
51 install -m 0755 ${WORKDIR}/sensord.init ${D}${sysconfdir}/init.d/sensord 56 install -m 0755 ${WORKDIR}/sensord.init ${D}${sysconfdir}/init.d/sensord
57
58 # Insall sensord service script
59 if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
60 install -d ${D}${systemd_unitdir}/system
61 install -m 0644 ${WORKDIR}/sensord.service ${D}${systemd_unitdir}/system
62
63 sed -i -e 's#@SYSCONFDIR@#${sysconfdir}#g' ${D}${systemd_unitdir}/system/sensord.service
64 sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/sensord.service
65 sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/sensord.service
66 fi
52} 67}
53 68
54# libsensors packages 69# libsensors packages
@@ -90,7 +105,7 @@ FILES_${PN}-sensors-doc = "${mandir}/man1 ${mandir}/man5"
90RDEPENDS_${PN}-sensors = "${PN}-libsensors" 105RDEPENDS_${PN}-sensors = "${PN}-libsensors"
91 106
92# sensord logging daemon 107# sensord logging daemon
93FILES_${PN}-sensord = "${sbindir}/sensord ${sysconfdir}/init.d/sensord" 108FILES_${PN}-sensord = "${sbindir}/sensord ${sysconfdir}/init.d/sensord ${systemd_unitdir}/system/sensord.service"
94FILES_${PN}-sensord-dbg = "${bindir}/.debug/sensord" 109FILES_${PN}-sensord-dbg = "${bindir}/.debug/sensord"
95FILES_${PN}-sensord-doc = "${mandir}/man8/sensord.8" 110FILES_${PN}-sensord-doc = "${mandir}/man8/sensord.8"
96RDEPENDS_${PN}-sensord = "${PN}-sensors rrdtool" 111RDEPENDS_${PN}-sensord = "${PN}-sensors rrdtool"