mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-04 14:39:54 +00:00
tftp-hpa: add systemd unit files
Add systemd unit files for tftp-hpa. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Tftp Server
|
||||
Requires=tftpd-hpa.socket
|
||||
|
||||
[Service]
|
||||
ExecStart=@SBINDIR@/in.tftpd-hpa -s /var/lib/tftpboot
|
||||
StandardInput=socket
|
||||
|
||||
[Install]
|
||||
Also=tftpd-hpa.socket
|
||||
@@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Tftp Server Activation Socket
|
||||
|
||||
[Socket]
|
||||
ListenDatagram=69
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
@@ -26,12 +26,14 @@ SRC_URI = "http://kernel.org/pub/software/network/tftp/tftp-hpa/tftp-hpa-${PV}.t
|
||||
file://add-error-check-for-disk-filled-up.patch \
|
||||
file://tftp-hpa-bug-fix-on-separated-CR-and-LF.patch \
|
||||
file://fix-writing-emtpy-file.patch \
|
||||
file://tftpd-hpa.socket \
|
||||
file://tftpd-hpa.service \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "46c9bd20bbffa62f79c958c7b99aac21"
|
||||
SRC_URI[sha256sum] = "0a9f88d4c1c02687b4853b02ab5dd8779d4de4ffdb9b2e5c9332841304d1a269"
|
||||
|
||||
inherit autotools-brokensep update-rc.d update-alternatives
|
||||
inherit autotools-brokensep update-rc.d update-alternatives systemd
|
||||
|
||||
export AR = "${HOST_PREFIX}ar cq"
|
||||
|
||||
@@ -60,6 +62,11 @@ do_install() {
|
||||
|
||||
install -d ${D}${sysconfdir}/default
|
||||
install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/tftpd-hpa
|
||||
|
||||
install -d ${D}${systemd_unitdir}/system
|
||||
install -m 0644 ${WORKDIR}/tftpd-hpa.socket ${D}${systemd_unitdir}/system
|
||||
install -m 0644 ${WORKDIR}/tftpd-hpa.service ${D}${systemd_unitdir}/system
|
||||
sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/tftpd-hpa.service
|
||||
}
|
||||
|
||||
FILES_${PN} = "${bindir}"
|
||||
@@ -77,3 +84,6 @@ ALTERNATIVE_${PN} = "tftp"
|
||||
ALTERNATIVE_TARGET[tftp] = "${bindir}/tftp-hpa"
|
||||
ALTERNATIVE_PRIORITY = "60"
|
||||
|
||||
SYSTEMD_PACKAGES = "tftp-hpa-server"
|
||||
SYSTEMD_SERVICE_tftp-hpa-server = "tftpd-hpa.socket tftpd-hpa.service"
|
||||
SYSTEMD_AUTO_ENABLE_tftp-hpa-server = "enable"
|
||||
|
||||
Reference in New Issue
Block a user