aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/dnsmasq/files
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2020-01-09 15:32:12 +0200
committerDaniel Golle <daniel@makrotopia.org>2020-01-09 15:37:53 +0200
commit6a2855212096d2c486961a0841b037bae4b75de7 (patch)
tree8f8fa00f6db83e66e7cc79341c870d292ad8082c /package/network/services/dnsmasq/files
parent8f0effc462e2c7467e4056c2cb09d9e1da078088 (diff)
downloadupstream-6a2855212096d2c486961a0841b037bae4b75de7.tar.gz
upstream-6a2855212096d2c486961a0841b037bae4b75de7.tar.bz2
upstream-6a2855212096d2c486961a0841b037bae4b75de7.zip
dnsmasq: add uci-defaults script for config migration
When running sysupgrade from an existing configuration, UCI option dhcp.@dnsmasq[0].resolvfile needs to be modified in case it has not been changed from it's original value. Accomplish that using a uci-defaults script. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/network/services/dnsmasq/files')
-rwxr-xr-xpackage/network/services/dnsmasq/files/50-dnsmasq-migrate-resolv-conf-auto.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/package/network/services/dnsmasq/files/50-dnsmasq-migrate-resolv-conf-auto.sh b/package/network/services/dnsmasq/files/50-dnsmasq-migrate-resolv-conf-auto.sh
new file mode 100755
index 0000000000..c78faa112d
--- /dev/null
+++ b/package/network/services/dnsmasq/files/50-dnsmasq-migrate-resolv-conf-auto.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+[ "$(uci get dhcp.@dnsmasq[0].resolvfile)" = "/tmp/resolv.conf.auto" ] && {
+ uci set dhcp.@dnsmasq[0].resolvfile="/tmp/resolv.conf.d/resolv.conf.auto"
+ uci commit dhcp
+}