diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2014-01-17 01:22:42 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-28 00:52:32 +0000 |
commit | c467a018ba364dc22fa2a3ba61c2c4e807e67c0a (patch) | |
tree | bfc6c7633ff50934c1047b9ea9e5032437502846 | |
parent | 7c098b4a62c2855a321e9db893531006ff2da6e5 (diff) | |
download | poky-c467a018ba364dc22fa2a3ba61c2c4e807e67c0a.tar.gz |
at: add systemd support
Add systemd support for at.
This patch mainly comes from meta-systemd.
[YOCTO #4420]
(From OE-Core rev: b71670bfbd8e394521cfd969eeafad4adc34c285)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-extended/at/at_3.1.14.bb | 10 | ||||
-rw-r--r-- | meta/recipes-extended/at/files/atd.service | 9 |
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 \ | |||
22 | file://posixtm.h \ | 22 | file://posixtm.h \ |
23 | file://file_replacement_with_gplv2.patch \ | 23 | file://file_replacement_with_gplv2.patch \ |
24 | file://S99at \ | 24 | file://S99at \ |
25 | file://atd.service \ | ||
25 | ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" | 26 | ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" |
26 | 27 | ||
27 | PAM_SRC_URI = "file://pam.conf.patch \ | 28 | PAM_SRC_URI = "file://pam.conf.patch \ |
@@ -37,7 +38,9 @@ EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \ | |||
37 | --with-atspool=/var/spool/at/spool \ | 38 | --with-atspool=/var/spool/at/spool \ |
38 | ac_cv_header_security_pam_appl_h=${@base_contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} " | 39 | ac_cv_header_security_pam_appl_h=${@base_contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} " |
39 | 40 | ||
40 | inherit autotools | 41 | inherit autotools systemd |
42 | |||
43 | SYSTEMD_SERVICE_${PN} = "atd.service" | ||
41 | 44 | ||
42 | PARALLEL_MAKE = "" | 45 | PARALLEL_MAKE = "" |
43 | 46 | ||
@@ -53,6 +56,11 @@ do_install () { | |||
53 | install -m 0755 ${WORKDIR}/S99at ${D}${sysconfdir}/init.d/atd | 56 | install -m 0755 ${WORKDIR}/S99at ${D}${sysconfdir}/init.d/atd |
54 | ln -sf ../init.d/atd ${D}${sysconfdir}/rcS.d/S99at | 57 | ln -sf ../init.d/atd ${D}${sysconfdir}/rcS.d/S99at |
55 | 58 | ||
59 | # install systemd unit files | ||
60 | install -d ${D}${systemd_unitdir}/system | ||
61 | install -m 0644 ${WORKDIR}/atd.service ${D}${systemd_unitdir}/system | ||
62 | sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/atd.service | ||
63 | |||
56 | if [ "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then | 64 | if [ "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then |
57 | install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd | 65 | install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd |
58 | fi | 66 | 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 @@ | |||
1 | [Unit] | ||
2 | Description=Job spooling tools | ||
3 | After=syslog.target | ||
4 | |||
5 | [Service] | ||
6 | ExecStart=@SBINDIR@/atd -f | ||
7 | |||
8 | [Install] | ||
9 | WantedBy=multi-user.target | ||