summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/busybox/busybox.mk2
-rwxr-xr-xpackage/busybox/udhcpc.script6
2 files changed, 8 insertions, 0 deletions
diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index 8e75e1f840..f68a2f8a42 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -212,6 +212,8 @@ define BUSYBOX_INSTALL_TARGET_CMDS
$(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) -C $(@D) install
$(INSTALL) -m 0755 -D package/busybox/udhcpc.script \
$(TARGET_DIR)/usr/share/udhcpc/default.script
+ $(INSTALL) -m 0755 -d \
+ $(TARGET_DIR)/usr/share/udhcpc/default.script.d
$(BUSYBOX_INSTALL_MDEV_CONF)
endef
diff --git a/package/busybox/udhcpc.script b/package/busybox/udhcpc.script
index e23d1f1e0f..50c52e6fe3 100755
--- a/package/busybox/udhcpc.script
+++ b/package/busybox/udhcpc.script
@@ -64,4 +64,10 @@ case "$1" in
;;
esac
+HOOK_DIR="$0.d"
+for hook in "${HOOK_DIR}/"*; do
+ [ -f "${hook}" -a -x "${hook}" ] || continue
+ "${hook}" "${@}"
+done
+
exit 0
OpenPOWER on IntegriCloud