Instead of duplicating the code around --addn-hosts make use of the
existing wrapper function.

Signed-off-by: Niklas Söderlund <niklas.soderl...@ragnatech.se>
---
 package/network/services/dnsmasq/files/dnsmasq.init | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init 
b/package/network/services/dnsmasq/files/dnsmasq.init
index 4cfb1554240b..fb061dceed6c 100755
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -1006,11 +1006,9 @@ dnsmasq_start()
        }
        config_get_bool ignore_hosts_dir "$cfg" ignore_hosts_dir 0
        if [ "$ignore_hosts_dir" = "1" ]; then
-               xappend "--addn-hosts=$HOSTFILE"
-               append EXTRA_MOUNT "$HOSTFILE"
+               append_addnhosts "$HOSTFILE"
        else
-               xappend "--addn-hosts=$HOSTFILE_DIR"
-               append EXTRA_MOUNT "$HOSTFILE_DIR"
+               append_addnhosts "$HOSTFILE_DIR"
        fi
        config_list_foreach "$cfg" "addnhosts" append_addnhosts
        config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain
-- 
2.46.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to