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.
This commit is contained in:
sideup66 2024-10-16 22:41:07 -04:00 committed by GitHub
parent 1fdbb186ae
commit e1db890843
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
}