diff options
author | John Estabrook <jestabro@vyos.io> | 2021-09-06 15:11:46 -0500 |
---|---|---|
committer | Daniil Baturin <daniil@vyos.io> | 2021-09-07 07:20:50 -0500 |
commit | df0a7ecdf9d4a566afb8bcb157c6a67d9383cecf (patch) | |
tree | b5f9716dcdaf78d0791d92eabc0c7f033990376d | |
parent | 17ec438016ce56299c3b6d682cad35e763d1b02a (diff) | |
download | vyatta-cfg-vpn-df0a7ecdf9d4a566afb8bcb157c6a67d9383cecf.tar.gz vyatta-cfg-vpn-df0a7ecdf9d4a566afb8bcb157c6a67d9383cecf.zip |
ipsec: T3808: add missing exit if 'vpn ipsec' has been deleted
-rwxr-xr-x | scripts/dmvpn-config.pl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/dmvpn-config.pl b/scripts/dmvpn-config.pl index 5562a7c..d482432 100755 --- a/scripts/dmvpn-config.pl +++ b/scripts/dmvpn-config.pl @@ -485,6 +485,11 @@ if (!(defined($config_file) && ( $config_file ne '' ))) { write_config( $genout, $config_file); +# Now exit, if 'vpn ipsec' has been deleted. +if ( !$vcVPN->exists('ipsec') ) { + exit(0); +} + my $update_interval = $vcVPN->returnValue("ipsec auto-update"); my $update_interval_orig = $vcVPN->returnOrigValue("ipsec auto-update"); $update_interval_orig = 0 if !defined($update_interval_orig); |