summaryrefslogtreecommitdiff
path: root/scripts/vyatta-vpn-op.pl
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2008-03-17 18:03:00 -0700
committerStig Thormodsrud <stig@vyatta.com>2008-03-17 18:03:00 -0700
commit2905f0a42e31d8510a6ca9d5f0004e6171b3f819 (patch)
tree284ef9be8a4c426673f236ce870b9c3fb8df80d2 /scripts/vyatta-vpn-op.pl
parent909b32e042719f7b1de5dd2e2f9e0d0a2ba5167c (diff)
downloadvyatta-op-vpn-2905f0a42e31d8510a6ca9d5f0004e6171b3f819.tar.gz
vyatta-op-vpn-2905f0a42e31d8510a6ca9d5f0004e6171b3f819.zip
Fix 2838: Clearing VPN process starts VPN , even if not configured.
- fix sloppy script which dies with "Unknown op" on valid ops. - use vyatta config rather than ipsec.conf to determine if running
Diffstat (limited to 'scripts/vyatta-vpn-op.pl')
-rwxr-xr-xscripts/vyatta-vpn-op.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/vyatta-vpn-op.pl b/scripts/vyatta-vpn-op.pl
index 4b519ba..ce6f957 100755
--- a/scripts/vyatta-vpn-op.pl
+++ b/scripts/vyatta-vpn-op.pl
@@ -13,12 +13,15 @@ if ($op eq '') {
if ($op eq 'clear-vpn-ipsec-process') {
system '/usr/sbin/ipsec setup restart';
+ exit 0;
}
if ($op eq 'show-vpn-debug') {
system '/usr/sbin/ipsec auto --status';
+ exit 0;
}
if ($op eq 'show-vpn-debug-detail') {
system '/usr/sbin/ipsec barf';
+ exit 0;
}
die "Unknown op: $op";