mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 19:14:30 +04:00
atftpd: Add 'enable' config option
Current version of atftpd daemon does automatically start when installed. This commit adds 'enable' option to config file to have control over atftpd daemon. Signed-off-by: Jakub Raczynski <myszsoda@gmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
config service 'service'
|
||||
option enable '0'
|
||||
option path '/srv/tftp'
|
||||
option port '69'
|
||||
|
||||
@@ -5,11 +5,15 @@ START=95
|
||||
PIDFILE=/tmp/run/atftpd.pid
|
||||
|
||||
start() {
|
||||
local enable
|
||||
local srv
|
||||
local port
|
||||
|
||||
config_load atftpd
|
||||
|
||||
config_get enable service enable 0
|
||||
[ "$enable" -eq "0" ] && return 0
|
||||
|
||||
config_get srv service path "/srv/tftp"
|
||||
config_get port service port 69
|
||||
|
||||
|
||||
Reference in New Issue
Block a user