From 2c73c4b9c60113cca27b64ca3f4130de210fbd39 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Tue, 19 Jun 2018 18:33:30 +0200 Subject: [PATCH] Make sure local DNS queries are resolved by dnsmasq Signed-off-by: David Oberhollenzer --- pkg/rootfs/build | 8 ++++++++ product/router/alix/dnsmasq.conf | 2 +- product/router/resolv.conf | 1 + product/router/rpi3/dnsmasq.conf | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 product/router/resolv.conf diff --git a/pkg/rootfs/build b/pkg/rootfs/build index 07abb8a..a0dc408 100755 --- a/pkg/rootfs/build +++ b/pkg/rootfs/build @@ -41,6 +41,14 @@ build() { echo "etc/$fname m 644 0 0" >> "$DEPLOY/pseudo" + # local config files + fname=$(file_path_override "resolv.conf") + + if [ ! -z "$fname" ]; then + cp "$fname" "./etc/resolv.conf" + echo "etc/resolv.conf m 644 0 0" >> "$DEPLOY/pseudo" + fi + # gather rootfs dependencies dependencies | tsort | tac | \ grep -v "$PKGNAME" > "$PKGBUILDDIR/etc/packages" diff --git a/product/router/alix/dnsmasq.conf b/product/router/alix/dnsmasq.conf index cabe24b..5dd0861 100644 --- a/product/router/alix/dnsmasq.conf +++ b/product/router/alix/dnsmasq.conf @@ -6,7 +6,7 @@ dhcp-lease-max=150 dhcp-leasefile=/var/lib/dnsmasq.leases user=dnsmasq group=dnsmasq -except-interface=lo +no-dhcp-interface=lo dhcp-authoritative enable-ra diff --git a/product/router/resolv.conf b/product/router/resolv.conf new file mode 100644 index 0000000..143c252 --- /dev/null +++ b/product/router/resolv.conf @@ -0,0 +1 @@ +nameserver 127.0.0.1 \ No newline at end of file diff --git a/product/router/rpi3/dnsmasq.conf b/product/router/rpi3/dnsmasq.conf index 7dcf268..6b9a232 100644 --- a/product/router/rpi3/dnsmasq.conf +++ b/product/router/rpi3/dnsmasq.conf @@ -6,7 +6,7 @@ dhcp-lease-max=150 dhcp-leasefile=/var/lib/dnsmasq.leases user=dnsmasq group=dnsmasq -except-interface=lo +no-dhcp-interface=lo dhcp-authoritative enable-ra