netifd: add a udhcpc.user placeholder script
authorRui Salvaterra <rsalvaterra@gmail.com>
Tue, 9 Mar 2021 22:22:09 +0000 (22:22 +0000)
committerHans Dedecker <dedeckeh@gmail.com>
Wed, 10 Mar 2021 19:16:22 +0000 (20:16 +0100)
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@gmail.com>
package/network/config/netifd/Makefile
package/network/config/netifd/files/etc/udhcpc.user [new file with mode: 0644]

index 7061456b08d9608036a25b6f9c8ea79ec25c7b90..3052f43ceb3f479f35a55dc153ffc7f426d1a63e 100644 (file)
@@ -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 (file)
index 0000000..78e2ba5
--- /dev/null
@@ -0,0 +1 @@
+# This script is sourced by udhcpc's dhcp.script at every DHCP event.