diff options
author | gavol <34028214+gavol@users.noreply.github.com> | 2023-11-11 11:00:34 +0100 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2023-11-11 11:21:30 +0000 |
commit | 0054e17282c7317182d2d710f9f129a179e99364 (patch) | |
tree | 8a8dd70128f973f5828060aae3db9975d902184b | |
parent | b8b3a39449a98f1ca6d3e0b6d65b59ffc3edcfab (diff) | |
download | vyos-1x-0054e17282c7317182d2d710f9f129a179e99364.tar.gz vyos-1x-0054e17282c7317182d2d710f9f129a179e99364.zip |
dhclient: T5724: run user hooks using run_hookdir
User hooks are executed using run_hookdir (defined in the /sbin/dhclient-script script) instead of run-parts. That allows user hooks to modify variables set by the dhcp client (e.g., the new_routers variable to avoid the installation of the default routes).
(cherry picked from commit 645a0e768e27912a3f46d00de31d0fc79b6fd463)
-rw-r--r-- | src/etc/dhcp/dhclient-enter-hooks.d/99-run-user-hooks | 2 | ||||
-rwxr-xr-x | src/etc/dhcp/dhclient-exit-hooks.d/98-run-user-hooks | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/etc/dhcp/dhclient-enter-hooks.d/99-run-user-hooks b/src/etc/dhcp/dhclient-enter-hooks.d/99-run-user-hooks index b4b4d516d..570758be6 100644 --- a/src/etc/dhcp/dhclient-enter-hooks.d/99-run-user-hooks +++ b/src/etc/dhcp/dhclient-enter-hooks.d/99-run-user-hooks @@ -1,5 +1,5 @@ #!/bin/bash DHCP_PRE_HOOKS="/config/scripts/dhcp-client/pre-hooks.d/" if [ -d "${DHCP_PRE_HOOKS}" ] ; then - run-parts "${DHCP_PRE_HOOKS}" + run_hookdir "${DHCP_PRE_HOOKS}" fi diff --git a/src/etc/dhcp/dhclient-exit-hooks.d/98-run-user-hooks b/src/etc/dhcp/dhclient-exit-hooks.d/98-run-user-hooks index 442419d79..910b586f0 100755 --- a/src/etc/dhcp/dhclient-exit-hooks.d/98-run-user-hooks +++ b/src/etc/dhcp/dhclient-exit-hooks.d/98-run-user-hooks @@ -1,5 +1,5 @@ #!/bin/bash DHCP_POST_HOOKS="/config/scripts/dhcp-client/post-hooks.d/" if [ -d "${DHCP_POST_HOOKS}" ] ; then - run-parts "${DHCP_POST_HOOKS}" + run_hookdir "${DHCP_POST_HOOKS}" fi |