diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2008-07-07 18:26:26 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2008-07-07 18:26:26 -0700 |
commit | ebfbd38c7ca62b0cdfec684f8b33a30e692a2d62 (patch) | |
tree | 747d0dfe4865e289d76caeafadb1235eac4948ac /scripts | |
parent | 878ad18ca03c7634f6483440852b0ad9279ad4ca (diff) | |
download | vyatta-op-vpn-ebfbd38c7ca62b0cdfec684f8b33a30e692a2d62.tar.gz vyatta-op-vpn-ebfbd38c7ca62b0cdfec684f8b33a30e692a2d62.zip |
partial fix for bugs 3044, 3047, 3048: minor show command output header
changes.
fix for bug 3440: regex now matches IP, hostname, or ID.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-show-vpn.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/vyatta-show-vpn.pl b/scripts/vyatta-show-vpn.pl index 1e84c1f..df8477b 100755 --- a/scripts/vyatta-show-vpn.pl +++ b/scripts/vyatta-show-vpn.pl @@ -41,11 +41,11 @@ if ($arg0 eq 'secrets') { open(DAT, $secret_file); my @raw_data=<DAT>; close(DAT); - print "Local IP Peer IP Secret\n"; + print "Local Peer Secret\n"; print "-------- ------- ------\n"; foreach my $line (@raw_data) { if ($line =~ /PSK/) { - my ($lip, $pip, $secret) = $line =~ /^(\d+\.\d+\.\d+\.\d+)\s+(\d+\.\d+\.\d+\.\d+)\s+\:\s+PSK\s+(\"\S+\")/; + my ($lip, $pip, $secret) = $line =~ /^(\S+)\s+(\S+)\s+\:\s+PSK\s+(\"\S+\")/; printf "%-15s %-15s %s\n", $lip, $pip, $secret; } } @@ -77,7 +77,7 @@ if ($arg0 eq 'rsa-keys') { my $rsa_key_name = $vc->returnOrigValue("ipsec site-to-site peer $peer authentication rsa-key-name"); my $remote_key = $vc->returnOrigValue("rsa-keys rsa-key-name $rsa_key_name rsa-key"); print "=" x 80, "\n"; - print "Peer IP: $peer"; + print "Peer: $peer"; if (defined($rsa_key_name)) { print " ($rsa_key_name)"; } |