summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-02-25 16:01:42 -0600
committerJohn Southworth <john.southworth@vyatta.com>2011-02-25 16:01:42 -0600
commitc6c593fe13f62af4cc50862ba4921f6b5279de5f (patch)
tree0622bbe7b82f6bfbba364dafd7b09402f2a4f685
parent57f7c8ea39d70423958598fe43b9cfaf804deffd (diff)
downloadvyatta-op-vpn-c6c593fe13f62af4cc50862ba4921f6b5279de5f.tar.gz
vyatta-op-vpn-c6c593fe13f62af4cc50862ba4921f6b5279de5f.zip
Fix 'show vpn ike status'
-rw-r--r--lib/OPMode.pm12
-rwxr-xr-xscripts/vyatta-op-vpn.pl6
-rw-r--r--templates/show/vpn/ike/status/node.def2
3 files changed, 18 insertions, 2 deletions
diff --git a/lib/OPMode.pm b/lib/OPMode.pm
index aaf08c2..8f17a7a 100644
--- a/lib/OPMode.pm
+++ b/lib/OPMode.pm
@@ -573,6 +573,18 @@ sub show_ipsec_sa_natt
}
display_ipsec_sa_brief(\%tmphash);
}
+sub show_ike_status{
+ my $process_id = `sudo cat /var/run/pluto.pid`;
+ chomp $process_id;
+
+ print <<EOS;
+IKE Process Running
+
+PID: $process_id
+
+EOS
+ exit 0;
+}
sub show_ike_sa
{
diff --git a/scripts/vyatta-op-vpn.pl b/scripts/vyatta-op-vpn.pl
index 85856f3..d6648ae 100755
--- a/scripts/vyatta-op-vpn.pl
+++ b/scripts/vyatta-op-vpn.pl
@@ -32,7 +32,7 @@ use strict;
my ($get_peers_for_cli, $get_conn_for_cli, $show_ipsec_sa, $show_ipsec_sa_detail,
$show_ipsec_sa_peer, $show_ipsec_sa_peer_detail, $show_ipsec_sa_natt,
$show_ipsec_sa_stats, $show_ipsec_sa_stats_peer, $show_ike_sa,
- $show_ike_sa_peer, $show_ike_sa_natt, $show_ike_secrets);
+ $show_ike_sa_peer, $show_ike_sa_natt, $show_ike_secrets, $show_ike_status);
my @show_ipsec_sa_stats_conn;
my @show_ipsec_sa_conn_detail;
my @show_ipsec_sa_conn;
@@ -52,6 +52,7 @@ GetOptions("show-ipsec-sa!" => \$show_ipsec_sa,
"show-ike-sa!" => \$show_ike_sa,
"show-ike-sa-peer=s" => \$show_ike_sa_peer,
"show-ike-sa-natt!" => \$show_ike_sa_natt,
+ "show-ike-status!" => \$show_ike_status,
"show-ike-secrets!" => \$show_ike_secrets);
if (defined $get_peers_for_cli) {
@@ -93,6 +94,9 @@ if (defined @show_ipsec_sa_stats_conn) {
if (defined $show_ike_sa) {
Vyatta::VPN::OPMode::show_ike_sa;
}
+if (defined $show_ike_status) {
+ Vyatta::VPN::OPMode::show_ike_status;
+}
if (defined $show_ike_sa_peer) {
Vyatta::VPN::OPMode::show_ike_sa_peer($show_ike_sa_peer);
}
diff --git a/templates/show/vpn/ike/status/node.def b/templates/show/vpn/ike/status/node.def
index f76e54e..e74a741 100644
--- a/templates/show/vpn/ike/status/node.def
+++ b/templates/show/vpn/ike/status/node.def
@@ -1,2 +1,2 @@
help: Show summary of IKE process information
-run: sudo /opt/vyatta/bin/sudo-users/command_proc_show_vpn show_vpn_ike_status.xsl
+run: sudo /opt/vyatta/bin/sudo-users/vyatta-op-vpn.pl --show-ike-status