diff options
author | John Crispin <blogic@openwrt.org> | 2015-03-13 08:38:35 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2015-03-13 08:38:35 +0000 |
commit | b81c2b5c9e69cd5f67eec84f3551c0d2c0d7d0dd (patch) | |
tree | 5f87bd2e9c9e4de5d9d4375719a1e2fba0872eb0 | |
parent | 925df2883782c1a7e3e165ec7867efab8780decb (diff) | |
download | master-187ad058-b81c2b5c9e69cd5f67eec84f3551c0d2c0d7d0dd.tar.gz master-187ad058-b81c2b5c9e69cd5f67eec84f3551c0d2c0d7d0dd.tar.bz2 master-187ad058-b81c2b5c9e69cd5f67eec84f3551c0d2c0d7d0dd.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>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44744 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/network/services/dnsmasq/files/dnsmasq.init | 7 |
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 |