summaryrefslogtreecommitdiff
path: root/src/etc/dhcp/dhclient-exit-hooks.d
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2024-01-14 22:32:14 +0000
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-01-15 08:50:24 +0000
commitc044a999b487d9e6fae1ac171d4bf20d60d2f33f (patch)
tree85d36db6923289951c2b3d44ea4b5175696ef56a /src/etc/dhcp/dhclient-exit-hooks.d
parent396adffb3fc0611ca2ad2d300b282a70641a901f (diff)
downloadvyos-1x-c044a999b487d9e6fae1ac171d4bf20d60d2f33f.tar.gz
vyos-1x-c044a999b487d9e6fae1ac171d4bf20d60d2f33f.zip
T4856: Fix IPsec DHCP-client exit hook
The script acually does not have the variable `secrets_lines` and secret lines itself does not have the marker `# dhcp:{interface}` in `to_find` Needs to rewrite this script in the future if it is required This commit fixes DHCP-client exit hook: ``` dhclient[6800]: NameError: name 'secrets_lines' is not defined root[6801]: /etc/dhcp/dhclient-exit-hooks.d/99-ipsec-dhclient-hook returned non-zero exit status 1 ``` (cherry picked from commit a9cf7246d4450c8b3e1b749b36c3393b0963404b)
Diffstat (limited to 'src/etc/dhcp/dhclient-exit-hooks.d')
-rwxr-xr-xsrc/etc/dhcp/dhclient-exit-hooks.d/99-ipsec-dhclient-hook4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/etc/dhcp/dhclient-exit-hooks.d/99-ipsec-dhclient-hook b/src/etc/dhcp/dhclient-exit-hooks.d/99-ipsec-dhclient-hook
index c7a92fe26..e6edc1ac3 100755
--- a/src/etc/dhcp/dhclient-exit-hooks.d/99-ipsec-dhclient-hook
+++ b/src/etc/dhcp/dhclient-exit-hooks.d/99-ipsec-dhclient-hook
@@ -71,10 +71,6 @@ if __name__ == '__main__':
conf_lines[i] = line.replace(old_ip, new_ip)
found = True
- for i, line in enumerate(secrets_lines):
- if line.find(to_match) > 0:
- secrets_lines[i] = line.replace(old_ip, new_ip)
-
if found:
write_file(SWANCTL_CONF, conf_lines)
ipsec_down(old_ip)