diff mbox series

dnsmasq: Make more use of append_addnhosts

Message ID 20240905175019.2443574-1-niklas.soderlund@ragnatech.se
State New
Headers show
Series dnsmasq: Make more use of append_addnhosts | expand

Commit Message

Niklas Söderlund Sept. 5, 2024, 5:50 p.m. UTC
Instead of duplicating the code around --addn-hosts make use of the
existing wrapper function.

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

Patch

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