From e1db89084387f82c14e147acaba373c5d945c809 Mon Sep 17 00:00:00 2001 From: sideup66 <47700565+sideup66@users.noreply.github.com> Date: Wed, 16 Oct 2024 22:41:07 -0400 Subject: [PATCH] Update S09dnsmasq Fixes to DnsMasq as something (Icamera, maybe?) would keep overwriting the file with a simple copy. This will remount it and make the resolv.conf read only. --- SD_ROOT/wz_mini/etc/network.d/S09dnsmasq | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SD_ROOT/wz_mini/etc/network.d/S09dnsmasq b/SD_ROOT/wz_mini/etc/network.d/S09dnsmasq index dc98165..1c72a31 100644 --- a/SD_ROOT/wz_mini/etc/network.d/S09dnsmasq +++ b/SD_ROOT/wz_mini/etc/network.d/S09dnsmasq @@ -28,9 +28,10 @@ dnsmasq_launch() { else /opt/wz_mini/bin/dnsmasq -C /opt/wz_mini/etc/dnsmasq.conf fi - sleep 3 - rm -f /tmp/resolv.conf - cp /opt/wz_mini/etc/resolv.conf /tmp/resolv.conf + sleep 5 + #mount the resolv.conf file as read only. Something (ICamera?) randomly seems to change it. + mount --bind /opt/wz_mini/etc/resolv.conf /tmp/resolv.conf + mount -o bind,remount,ro /tmp/resolv.conf echo "dnsmasq enabled" fi }