From: Mohd Husaam Mehdi Date: Fri, 29 Mar 2024 17:19:37 +0000 (+0530) Subject: atftpd: update init script to publish tftp service X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=4695e2c10fb00e3ead4a30313a2db2de5be0dedd;p=feed%2Fpackages.git atftpd: update init script to publish tftp service update init script to announce tftp service over mdns Signed-off-by: Mohd Husaam Mehdi --- diff --git a/net/atftp/Makefile b/net/atftp/Makefile index c7cf408812..0e57c8815d 100644 --- a/net/atftp/Makefile +++ b/net/atftp/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=atftp PKG_VERSION:=0.8.0 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/$(PKG_NAME) diff --git a/net/atftp/files/atftpd.init b/net/atftp/files/atftpd.init index b05beee4df..369c6bc778 100755 --- a/net/atftp/files/atftpd.init +++ b/net/atftp/files/atftpd.init @@ -10,6 +10,7 @@ start_service() { local enable local srv local port + local mdns config_load atftpd @@ -18,9 +19,11 @@ start_service() { config_get srv service path "/srv/tftp" config_get port service port 69 + config_get mdns service mdns 0 procd_open_instance procd_set_param command $BIN "--no-fork" "--daemon" "--user" "root.root" "--port" "$port" "$srv" + [ "${mdns}" -ne 0 ] && procd_add_mdns "tftp" "udp" "$port" "daemon=atftpd" procd_set_param respawn procd_close_instance }