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>
This commit is contained in:
parent
7c098b4a62
commit
c467a018ba
|
@ -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
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=Job spooling tools
|
||||
After=syslog.target
|
||||
|
||||
[Service]
|
||||
ExecStart=@SBINDIR@/atd -f
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue