summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2024-01-14 22:32:14 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2024-01-14 22:32:14 +0000
commita9cf7246d4450c8b3e1b749b36c3393b0963404b (patch)
treee0249ea4cc30d5d5fdcb1cf10f21f63ee549c81b
parentc2215e39f134f11903f8c3d1500e79226ad45222 (diff)
downloadvyos-1x-a9cf7246d4450c8b3e1b749b36c3393b0963404b.tar.gz
vyos-1x-a9cf7246d4450c8b3e1b749b36c3393b0963404b.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 ```
-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)