Support for this option has been removed from odhcpd, so remove it in
the defaults as well.
Signed-off-by: David Härdeman <david@hardeman.nu>
Link: https://github.com/openwrt/openwrt/pull/20673
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
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
#!/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
;;
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'