[openwrt/openwrt] netifd: add a udhcpc.user placeholder script

LEDE Commits lede-commits at lists.infradead.org
Wed May 26 00:32:13 PDT 2021


rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/5b16484b0da66c3bb7326dc12ce35140a445560c

commit 5b16484b0da66c3bb7326dc12ce35140a445560c
Author: Rui Salvaterra <rsalvaterra at gmail.com>
AuthorDate: Tue Mar 9 22:22:09 2021 +0000

    netifd: add a udhcpc.user placeholder script
    
    Document the existence of this feature. This allows the user to execute a script
    at each DHCPv4 event. This is useful, for example, as an ad-hoc way to update a
    DDNS entry when (and only when) required.
    
    Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
    (cherry picked from commit 130118f7aa3191a2afd244d49e3057d4c5688676)
---
 package/network/config/netifd/Makefile              | 6 +++++-
 package/network/config/netifd/files/etc/udhcpc.user | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index 7061456b08..3052f43ceb 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=netifd
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
@@ -25,6 +25,10 @@ define Package/netifd
   TITLE:=OpenWrt Network Interface Configuration Daemon
 endef
 
+define Package/netifd/conffiles
+/etc/udhcpc.user
+endef
+
 TARGET_CFLAGS += \
 	-I$(STAGING_DIR)/usr/include/libnl-tiny \
 	-I$(STAGING_DIR)/usr/include \
diff --git a/package/network/config/netifd/files/etc/udhcpc.user b/package/network/config/netifd/files/etc/udhcpc.user
new file mode 100644
index 0000000000..78e2ba5f18
--- /dev/null
+++ b/package/network/config/netifd/files/etc/udhcpc.user
@@ -0,0 +1 @@
+# This script is sourced by udhcpc's dhcp.script at every DHCP event.



More information about the lede-commits mailing list