Revert "dnsmasq: migrate dhcpv4/dhcpv6 default on upgrade"
This reverts commit d043c78bb5.
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||
PKG_NAME:=dnsmasq
|
||||
PKG_UPSTREAM_VERSION:=2.93
|
||||
PKG_VERSION:=$(subst test,~~test,$(subst rc,~rc,$(PKG_UPSTREAM_VERSION)))
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_UPSTREAM_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://thekelleys.org.uk/dnsmasq/
|
||||
@@ -188,7 +188,6 @@ define Package/dnsmasq/install
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./files/50-dnsmasq-migrate-resolv-conf-auto.sh $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./files/50-dnsmasq-migrate-ipset.sh $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./files/50-dnsmasq-migrate-dhcp-default.sh $(1)/etc/uci-defaults
|
||||
endef
|
||||
|
||||
Package/dnsmasq-dhcpv6/install = $(Package/dnsmasq/install)
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/bin/sh
|
||||
# dnsmasq.init used to treat an unset 'dhcpv4'/'dhcpv6' option as
|
||||
# implicitly enabled. Since the fallback default was changed to
|
||||
# 'disabled' (to match odhcpd), any existing 'config dhcp' section
|
||||
# that never had to set these options explicitly silently stops
|
||||
# serving that protocol. Pin the old behavior for configs that
|
||||
# predate the change.
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
migrate_dhcp() {
|
||||
local cfg="$1"
|
||||
local dhcpv4 dhcpv6
|
||||
|
||||
config_get dhcpv4 "$cfg" dhcpv4
|
||||
config_get dhcpv6 "$cfg" dhcpv6
|
||||
|
||||
[ -n "$dhcpv4" ] || uci -q set dhcp."$cfg".dhcpv4='server'
|
||||
[ -n "$dhcpv6" ] || uci -q set dhcp."$cfg".dhcpv6='server'
|
||||
}
|
||||
|
||||
config_load dhcp
|
||||
config_foreach migrate_dhcp dhcp
|
||||
|
||||
uci -q commit dhcp
|
||||
exit 0
|
||||
Reference in New Issue
Block a user