[openwrt/openwrt] odhcpd: remove legacy option
LEDE Commits
lede-commits at lists.infradead.org
Mon Nov 10 04:00:07 PST 2025
noltari pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9be49705810db60e2e4552218be5be97e37805f0
commit 9be49705810db60e2e4552218be5be97e37805f0
Author: David Härdeman <david at hardeman.nu>
AuthorDate: Wed Nov 5 09:46:31 2025 +0100
odhcpd: remove legacy option
Support for this option has been removed from odhcpd, so remove it in
the defaults as well.
Signed-off-by: David Härdeman <david at hardeman.nu>
Link: https://github.com/openwrt/openwrt/pull/20673
Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
---
package/network/services/odhcpd/Makefile | 2 +-
package/network/services/odhcpd/files/odhcpd.defaults | 13 +++++++++++--
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/package/network/services/odhcpd/Makefile b/package/network/services/odhcpd/Makefile
index c8512bad93..1828a094b4 100644
--- a/package/network/services/odhcpd/Makefile
+++ b/package/network/services/odhcpd/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=odhcpd
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git
diff --git a/package/network/services/odhcpd/files/odhcpd.defaults b/package/network/services/odhcpd/files/odhcpd.defaults
index f64bf9bb0c..ac73780a94 100644
--- a/package/network/services/odhcpd/files/odhcpd.defaults
+++ b/package/network/services/odhcpd/files/odhcpd.defaults
@@ -1,11 +1,20 @@
#!/bin/sh
if [ -n "$(uci -q get dhcp.odhcpd)" ]; then
+ local commit
+ commit=0
+
if [ -z "$(uci -q get dhcp.odhcpd.piofolder)" ]; then
uci set dhcp.odhcpd.piofolder=/tmp/odhcpd-piofolder
- uci commit dhcp
+ commit=1
+ fi
+
+ if [ -n "$(uci -q get dhcp.odhcpd.legacy)" ]; then
+ uci delete dhcp.odhcpd.legacy
+ commit=1
fi
+ [ "$commit" -eq 1 ] && uci commit dhcp
exit 0
fi
@@ -34,7 +43,7 @@ case "$protocol" in
;;
esac
-uci get dhcp.lan 1>/dev/null 2>/dev/null || {
+uci -q get dhcp.lan || {
uci batch <<EOF
set dhcp.lan=dhcp
set dhcp.lan.interface='lan'
More information about the lede-commits
mailing list