summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-extended/atftp/atftp_0.7.bb50
-rw-r--r--meta-oe/recipes-extended/atftp/files/atftpd.init37
-rw-r--r--meta-oe/recipes-extended/atftp/files/atftpd.service11
3 files changed, 98 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/atftp/atftp_0.7.bb b/meta-oe/recipes-extended/atftp/atftp_0.7.bb
new file mode 100644
index 000000000..c5416341f
--- /dev/null
+++ b/meta-oe/recipes-extended/atftp/atftp_0.7.bb
@@ -0,0 +1,50 @@
1DESCRIPTION = "Advanced TFTP server and client"
2SECTION = "network"
3HOMEPAGE = "http://packages.debian.org/atftp"
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f"
6
7SRC_URI = "${DEBIAN_MIRROR}/main/a/atftp/atftp_${PV}.dfsg.orig.tar.gz;name=archive \
8 ${DEBIAN_MIRROR}/main/a/atftp/atftp_${PV}.dfsg-11.diff.gz;name=patch \
9 file://atftpd.init \
10 file://atftpd.service"
11
12S = "${WORKDIR}/atftp-${PV}.dfsg"
13
14inherit autotools update-rc.d systemd useradd
15
16SYSTEMD_PACKAGES = "atftpd-systemd"
17SYSTEMD_SERVICE_atftpd-systemd = "atftpd.service"
18
19INITSCRIPT_NAME = "atftpd"
20INITSCRIPT_PARAMS = "defaults 80"
21
22USERADD_PACKAGES = "atftpd"
23USERADD_PARAM_atftpd = "--system --no-create-home --shell /bin/false \
24 --user-group nobody"
25
26do_install_append() {
27 install -d ${D}${sysconfdir}/init.d
28 install -m 0755 ${WORKDIR}/atftpd.init ${D}${sysconfdir}/init.d/atftpd
29
30 install -d ${D}${base_libdir}/systemd/system
31 install -m 644 ${WORKDIR}/atftpd.service ${D}${base_libdir}/systemd/system
32
33 install -d ${D}/srv/tftp
34
35 rm ${D}${sbindir}/in.tftpd
36}
37
38PACKAGES =+ "atftpd-systemd atftpd"
39
40FILES_${PN} = "${bindir}/*"
41
42FILES_${PN}d = "${sbindir}/* ${sysconfdir}/init.d/* /srv/tftp"
43
44FILES_atftpd-systemd += "${base_libdir}/systemd"
45RDEPENDS_atftpd-systemd += "atftpd"
46
47SRC_URI[archive.md5sum] = "aa269044a6f992eca78fee2f6119643c"
48SRC_URI[archive.sha256sum] = "18815f5b67290fac087c6b9da28dfa5e0feb722096f5c5de52e59b46026da559"
49SRC_URI[patch.md5sum] = "1636f199bf32c754a7bf34a5c647d138"
50SRC_URI[patch.sha256sum] = "0df33f6c09c2b2de58a84d7bb757844fc9538cd4d6c8d9c463da5270ebc2e41d"
diff --git a/meta-oe/recipes-extended/atftp/files/atftpd.init b/meta-oe/recipes-extended/atftp/files/atftpd.init
new file mode 100644
index 000000000..161d97aca
--- /dev/null
+++ b/meta-oe/recipes-extended/atftp/files/atftpd.init
@@ -0,0 +1,37 @@
1#! /bin/sh
2#
3# This is an init script for openembedded
4# Copy it to /etc/init.d/atftpd and type
5# > update-rc.d atftpd defaults 60
6#
7
8
9test -f /usr/sbin/atftpd || exit 0
10
11test -d /srv/tftp || mkdir -p /srv/tftp
12
13case "$1" in
14 start)
15 echo -n "Starting tftp daemon: atftpd"
16 start-stop-daemon --start --quiet --exec /usr/sbin/atftpd -- --daemon --port 69
17 echo "."
18 ;;
19 stop)
20 echo -n "Stopping tftp daemon: atftpd"
21 start-stop-daemon --stop --quiet --exec /usr/sbin/atftpd
22 echo "."
23 ;;
24 reload|force-reload)
25 start-stop-daemon --stop --quiet --signal 1 --exec /usr/sbin/atftpd
26 ;;
27 restart)
28 $0 stop
29 sleep 1
30 $0 start
31 ;;
32 *)
33 echo "Usage: /etc/init.d/atftpd {start|stop|reload|restart|force-reload}"
34 exit 1
35esac
36
37exit 0
diff --git a/meta-oe/recipes-extended/atftp/files/atftpd.service b/meta-oe/recipes-extended/atftp/files/atftpd.service
new file mode 100644
index 000000000..c7aa29c09
--- /dev/null
+++ b/meta-oe/recipes-extended/atftp/files/atftpd.service
@@ -0,0 +1,11 @@
1[Unit]
2Description=Advanced TFTP Server
3After=syslog.target network.target
4
5[Service]
6Type=forking
7PIDFile=/var/run/atftpd.pid
8ExecStart=/usr/sbin/atftpd --daemon --port 69
9
10[Install]
11WantedBy=multi-user.target