summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rwxr-xr-xbuild14
1 files changed, 10 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; \