summaryrefslogtreecommitdiff
path: root/meta/recipes-extended/at
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-01-17 01:22:42 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-28 00:48:24 +0000
commitb71670bfbd8e394521cfd969eeafad4adc34c285 (patch)
tree36bb736df55597f79c4efca4bc25bd1a9e9ccad0 /meta/recipes-extended/at
parentbaae0b0e8786e26b60e17c4febd57ca1915f1e55 (diff)
downloadopenembedded-core-b71670bfbd8e394521cfd969eeafad4adc34c285.tar.gz
openembedded-core-b71670bfbd8e394521cfd969eeafad4adc34c285.tar.bz2
openembedded-core-b71670bfbd8e394521cfd969eeafad4adc34c285.zip
at: add systemd support
Add systemd support for at. This patch mainly comes from meta-systemd. [YOCTO #4420] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-extended/at')
-rw-r--r--meta/recipes-extended/at/at_3.1.14.bb10
-rw-r--r--meta/recipes-extended/at/files/atd.service9
2 files changed, 18 insertions, 1 deletions
diff --git a/meta/recipes-extended/at/at_3.1.14.bb b/meta/recipes-extended/at/at_3.1.14.bb
index 0a1315726e..480e7329a5 100644
--- a/meta/recipes-extended/at/at_3.1.14.bb
+++ b/meta/recipes-extended/at/at_3.1.14.bb
@@ -22,6 +22,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz \
file://posixtm.h \
file://file_replacement_with_gplv2.patch \
file://S99at \
+ file://atd.service \
${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
PAM_SRC_URI = "file://pam.conf.patch \
@@ -37,7 +38,9 @@ EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \
--with-atspool=/var/spool/at/spool \
ac_cv_header_security_pam_appl_h=${@base_contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} "
-inherit autotools
+inherit autotools systemd
+
+SYSTEMD_SERVICE_${PN} = "atd.service"
PARALLEL_MAKE = ""
@@ -53,6 +56,11 @@ do_install () {
install -m 0755 ${WORKDIR}/S99at ${D}${sysconfdir}/init.d/atd
ln -sf ../init.d/atd ${D}${sysconfdir}/rcS.d/S99at
+ # install systemd unit files
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/atd.service ${D}${systemd_unitdir}/system
+ sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/atd.service
+
if [ "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd
fi
diff --git a/meta/recipes-extended/at/files/atd.service b/meta/recipes-extended/at/files/atd.service
new file mode 100644
index 0000000000..6dc844504a
--- /dev/null
+++ b/meta/recipes-extended/at/files/atd.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Job spooling tools
+After=syslog.target
+
+[Service]
+ExecStart=@SBINDIR@/atd -f
+
+[Install]
+WantedBy=multi-user.target