diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2017-05-04 22:33:37 +0200 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2017-05-04 22:42:49 +0200 |
commit | cd5cd7c859660a52a09d6744a4343e3078a8c883 (patch) | |
tree | eb452feb52468ec966d544edf7dc2868b9dad812 | |
parent | d17cb4a68a4544dca690629ee9a2483da29fa42a (diff) | |
download | upstream-cd5cd7c859660a52a09d6744a4343e3078a8c883.tar.gz upstream-cd5cd7c859660a52a09d6744a4343e3078a8c883.tar.bz2 upstream-cd5cd7c859660a52a09d6744a4343e3078a8c883.zip |
dnsmasq: fix dhcp_option usage warning
Don't display unnecessary dhcp_option usage warning in case
dhcp_option is empty
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
-rw-r--r-- | package/network/services/dnsmasq/files/dnsmasq.init | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init index 4291df2544..e6ba7322e3 100644 --- a/package/network/services/dnsmasq/files/dnsmasq.init +++ b/package/network/services/dnsmasq/files/dnsmasq.init @@ -560,9 +560,10 @@ dhcp_option_add() { if [ -n "$list_len" ]; then config_list_foreach "$cfg" dhcp_option dhcp_option_append "$networkid" "$force" else - echo "Warning: the 'option dhcp_option' syntax is deprecated, use 'list dhcp_option'" >&2 config_get dhcp_option "$cfg" dhcp_option + [ -n "$dhcp_option" ] && echo "Warning: the 'option dhcp_option' syntax is deprecated, use 'list dhcp_option'" >&2 + local option for option in $dhcp_option; do dhcp_option_append "$option" "$networkid" "$force" |