From b71670bfbd8e394521cfd969eeafad4adc34c285 Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Fri, 17 Jan 2014 01:22:42 -0500 Subject: at: add systemd support Add systemd support for at. This patch mainly comes from meta-systemd. [YOCTO #4420] Signed-off-by: Chen Qi Signed-off-by: Saul Wold --- meta/recipes-extended/at/at_3.1.14.bb | 10 +++++++++- meta/recipes-extended/at/files/atd.service | 9 +++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-extended/at/files/atd.service (limited to 'meta/recipes-extended') 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 -- cgit v1.2.3