[PATCH] dnsmasq: Make more use of append_addnhosts
Niklas Söderlund
niklas.soderlund at ragnatech.se
Thu Sep 5 10:50:19 PDT 2024
Instead of duplicating the code around --addn-hosts make use of the
existing wrapper function.
Signed-off-by: Niklas Söderlund <niklas.soderlund at 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
More information about the openwrt-devel
mailing list