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>
This commit is contained in:
parent
d17cb4a68a
commit
cd5cd7c859
1 changed files with 2 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue