summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2021-09-06 15:11:46 -0500
committerDaniil Baturin <daniil@vyos.io>2021-09-07 07:20:50 -0500
commitdf0a7ecdf9d4a566afb8bcb157c6a67d9383cecf (patch)
treeb5f9716dcdaf78d0791d92eabc0c7f033990376d
parent17ec438016ce56299c3b6d682cad35e763d1b02a (diff)
downloadvyatta-cfg-vpn-df0a7ecdf9d4a566afb8bcb157c6a67d9383cecf.tar.gz
vyatta-cfg-vpn-df0a7ecdf9d4a566afb8bcb157c6a67d9383cecf.zip
ipsec: T3808: add missing exit if 'vpn ipsec' has been deleted
-rwxr-xr-xscripts/dmvpn-config.pl5
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);