From 75929793a98e32e5af0acd35d780ef8048094bd1 Mon Sep 17 00:00:00 2001 From: Mohd Husaam Mehdi Date: Fri, 29 Mar 2024 22:49:37 +0530 Subject: [PATCH] atftpd: update init script to publish tftp service update init script to announce tftp service over mdns Signed-off-by: Mohd Husaam Mehdi --- net/atftp/files/atftpd.init | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/atftp/files/atftpd.init b/net/atftp/files/atftpd.init index 1bd43c1b9b8f99..ec0689f5b9409b 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 1 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 }