diff options
Diffstat (limited to 'build')
-rwxr-xr-x | build | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -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; \ |