aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeon M. George <leon@georgemail.eu>2021-03-23 11:02:36 +0100
committerHans Dedecker <dedeckeh@gmail.com>2021-04-17 21:15:33 +0200
commitf6cc00650cbdc887a6b7557e6934dec3a04e31da (patch)
tree21ea6a6c2c1e55f7c6f8cbe5261b989a5eb2c2be
parent467c32600cc575fcb67c5f01ad32e02141220ceb (diff)
downloadupstream-f6cc00650cbdc887a6b7557e6934dec3a04e31da.tar.gz
upstream-f6cc00650cbdc887a6b7557e6934dec3a04e31da.tar.bz2
upstream-f6cc00650cbdc887a6b7557e6934dec3a04e31da.zip
odhcp6c: read user scripts from directory
Placeholder DHCP user scripts were added recently. These files make package-based installations of such scripts more difficult. Pull user callbacks from directories instead to allow packages and users to install co-existing scripts more easily. References: b4f3d93b5 odhcp6c: add a odhcp6c.user placeholder script Signed-off-by: Leon M. George <leon@georgemail.eu> Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
-rw-r--r--package/network/ipv6/odhcp6c/Makefile5
-rwxr-xr-xpackage/network/ipv6/odhcp6c/files/dhcpv6.script3
2 files changed, 6 insertions, 2 deletions
diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile
index b3b2ea11fb..a4e62d04f2 100644
--- a/package/network/ipv6/odhcp6c/Makefile
+++ b/package/network/ipv6/odhcp6c/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=odhcp6c
-PKG_RELEASE:=17
+PKG_RELEASE:=18
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git
@@ -44,6 +44,7 @@ endef
define Package/odhcp6c/conffiles
/etc/odhcp6c.user
+/etc/odhcp6c.user.d/
endef
define Package/odhcp6c/install
@@ -52,7 +53,7 @@ define Package/odhcp6c/install
$(INSTALL_DIR) $(1)/lib/netifd/proto
$(INSTALL_BIN) ./files/dhcpv6.sh $(1)/lib/netifd/proto/dhcpv6.sh
$(INSTALL_BIN) ./files/dhcpv6.script $(1)/lib/netifd/
- $(INSTALL_DIR) $(1)/etc/
+ $(INSTALL_DIR) $(1)/etc/odhcp6c.user.d/
$(INSTALL_CONF) ./files/odhcp6c.user $(1)/etc/
endef
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script
index 28955a358f..b1a99ed986 100755
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.script
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script
@@ -237,5 +237,8 @@ esac
# user rules
[ -f /etc/odhcp6c.user ] && . /etc/odhcp6c.user "$@"
+for f in /etc/odhcp6c.user.d/*; do
+ [ -f "$f" ] && (. "$f" "$@")
+done
exit 0