Skip to content

Commit

Permalink
atftpd: update init script to publish tftp service
Browse files Browse the repository at this point in the history
update init script to announce tftp service over mdns

Signed-off-by: Mohd Husaam Mehdi <husaam.mehdi@iopsys.eu>
  • Loading branch information
mhusaam authored and feckert committed Nov 28, 2024
1 parent 6afd740 commit 4695e2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion net/atftp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions net/atftp/files/atftpd.init
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ start_service() {
local enable
local srv
local port
local mdns

config_load atftpd

Expand All @@ -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
}

0 comments on commit 4695e2c

Please sign in to comment.