diff options
-rwxr-xr-x | build | 14 | ||||
-rw-r--r-- | network-hooks | 1 |
2 files changed, 11 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; \ 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 |