summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2024-01-08 09:33:08 +0100
committerGitHub <noreply@github.com>2024-01-08 09:33:08 +0100
commit28f62b101eb115d3e97b2ca72ae88b79a89efd96 (patch)
tree280eec8488a13b92ae5563e8c480f552714b41ba
parent37ce0e6803f1d3f116bbd59ff7f14e160c99aa47 (diff)
parenteeea8f4c6f10d0f7cd3e8fea20a4d1c0a36ad902 (diff)
Merge pull request #22440 from myszsoda/atftpd_option_enable
atftpd: Add 'enable' config option
-rw-r--r--net/atftp/Makefile2
-rw-r--r--net/atftp/files/atftpd.conf2
-rwxr-xr-xnet/atftp/files/atftpd.init14
3 files changed, 14 insertions, 4 deletions
diff --git a/net/atftp/Makefile b/net/atftp/Makefile
index cabdd3efd..0d281502e 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:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
diff --git a/net/atftp/files/atftpd.conf b/net/atftp/files/atftpd.conf
index 6bd66e94c..cea135d2e 100644
--- a/net/atftp/files/atftpd.conf
+++ b/net/atftp/files/atftpd.conf
@@ -1,3 +1,5 @@
config service 'service'
+ option enable '0'
option path '/srv/tftp'
+ option port '69'
diff --git a/net/atftp/files/atftpd.init b/net/atftp/files/atftpd.init
index 83573f998..03627eeb3 100755
--- a/net/atftp/files/atftpd.init
+++ b/net/atftp/files/atftpd.init
@@ -5,11 +5,19 @@ START=95
PIDFILE=/tmp/run/atftpd.pid
start() {
+ local enable
+ local srv
+ local port
+
config_load atftpd
- config_get SRV service path "/srv/tftp"
- config_get PORT service port 69
- atftpd --pidfile $PIDFILE --user root.root --port $PORT --daemon $SRV
+ config_get enable service enable 0
+ [ "$enable" -eq "0" ] && return 0
+
+ config_get srv service path "/srv/tftp"
+ config_get port service port 69
+
+ atftpd --pidfile $PIDFILE --user root.root --port $port --daemon $srv
}
stop() {