aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2015-03-13 08:38:35 +0000
committerJohn Crispin <john@openwrt.org>2015-03-13 08:38:35 +0000
commitfb60dd2ae69bc27a6f53ba1a360e1e052be4633f (patch)
treef4e03ec383891554b7ad7bbff08cc4e8c37191a0 /package
parent31b8de458787a3e935f4181363092543be6b99f6 (diff)
downloadupstream-fb60dd2ae69bc27a6f53ba1a360e1e052be4633f.tar.gz
upstream-fb60dd2ae69bc27a6f53ba1a360e1e052be4633f.tar.bz2
upstream-fb60dd2ae69bc27a6f53ba1a360e1e052be4633f.zip
dnsmasq: Make parameters optional in dhcpboot config
The --dhcp-boot option of dnsmasq does not require servername and serveraddress arguments if the builtin tftp server is used. Signed-off-by: Stefan Tomanek <stefan.tomanek+openwrt@wertarbyte.de> SVN-Revision: 44744
Diffstat (limited to 'package')
-rw-r--r--package/network/services/dnsmasq/files/dnsmasq.init7
1 files changed, 3 insertions, 4 deletions
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 40ec584c1b..fb118d5756 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -364,12 +364,11 @@ dhcp_boot_add() {
[ -n "$filename" ] || return 0
config_get servername "$cfg" servername
- [ -n "$servername" ] || return 0
-
config_get serveraddress "$cfg" serveraddress
- [ -n "$serveraddress" ] || return 0
- xappend "--dhcp-boot=${networkid:+net:$networkid,}$filename,$servername,$serveraddress"
+ [ -n "$serveraddress" -a ! -n "$servername" ] && return 0
+
+ xappend "--dhcp-boot=${networkid:+net:$networkid,}${filename}${servername:+,$servername}${serveraddress:+,$serveraddress}"
config_get_bool force "$cfg" force 0