summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild14
-rw-r--r--network-hooks1
2 files changed, 11 insertions, 4 deletions
diff --git a/build b/build
index e60c3eb..2303230 100755
--- a/build
+++ b/build
@@ -73,11 +73,17 @@ install: build
install -d -m 0755 dest/etc; \
for dir in '' if-pre-up.d if-up.d if-down.d if-post-down.d; do \
install -d -m 0755 "dest/etc/network/$${dir}"; \
- if [ -d "../src.etc/network/$${dir}" ]; then \
- install -m 0755 "../src.etc/network/$${dir}/"* \
- "dest/etc/network/$${dir}"; \
- fi; \
done; \
+ while read -r config hook; do \
+ for dir in if-pre-up.d if-up.d if-down.d \
+ if-post-down.d; do \
+ [ -f "../src.etc/network/$${dir}/$${hook}" ] \
+ || continue; \
+ config_enabled "$${config}" && install -m 0755 \
+ "../src.etc/network/$${dir}/$${hook}" \
+ "dest/etc/network/$${dir}"; \
+ done; \
+ done <../network-hooks; \
fi; \
if config_enabled UDHCPC; then \
install -d -m 0755 dest/usr/share/udhcpc; \
diff --git a/network-hooks b/network-hooks
new file mode 100644
index 0000000..cfabf44
--- /dev/null
+++ b/network-hooks
@@ -0,0 +1 @@
+UDHCPD dhcpd