From 2905f0a42e31d8510a6ca9d5f0004e6171b3f819 Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Mon, 17 Mar 2008 18:03:00 -0700 Subject: 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 --- scripts/vyatta-vpn-op.pl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts/vyatta-vpn-op.pl') 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"; -- cgit v1.2.3