From 04cb338f62c4e6a8ebd062a524cd2c1c6a3489f4 Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Thu, 10 Dec 2009 17:19:18 -0800 Subject: fix show vpn commands to work with strongswan (cherry picked from commit 32927e013922e1a79b0f214773e2500a1260871a) --- scripts/gen_local_rsa_key.pl | 2 +- scripts/vyatta-vpn-op.pl | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/gen_local_rsa_key.pl b/scripts/gen_local_rsa_key.pl index 2be6b2a..9bf914c 100755 --- a/scripts/gen_local_rsa_key.pl +++ b/scripts/gen_local_rsa_key.pl @@ -104,7 +104,7 @@ my $file_pubkey = rsa_get_local_pubkey($local_key_file); if ($file_pubkey ne 0) { print "\nYour new local RSA key has been generated\n"; print "The public portion of the key is:\n\n$file_pubkey\n\n"; - $cmd = "ipsec auto --rereadall 2> /dev/null"; + $cmd = "ipsec rereadall 2> /dev/null"; vpn_debug $cmd; system $cmd; exit 0; diff --git a/scripts/vyatta-vpn-op.pl b/scripts/vyatta-vpn-op.pl index db44959..adcbf84 100755 --- a/scripts/vyatta-vpn-op.pl +++ b/scripts/vyatta-vpn-op.pl @@ -62,13 +62,14 @@ if ($op eq '') { } if ($op eq 'clear-vpn-ipsec-process') { - system 'sudo /usr/sbin/ipsec restart'; + print "Clearing IPsec process...\n"; + system 'sudo /usr/sbin/ipsec restart >&/dev/null'; } elsif ($op eq 'show-vpn-debug') { - system 'sudo /usr/sbin/ipsec status'; + system 'sudo /usr/sbin/ipsec statusall'; } elsif ($op eq 'show-vpn-debug-detail') { - system 'sudo /usr/sbin/ipsec statusall'; + system 'sudo /usr/lib/ipsec/barf'; } elsif ($op eq 'get-all-peers') { # get all site-to-site peers -- cgit v1.2.3