diff options
author | Alex Harpin <development@landsofshadow.co.uk> | 2014-08-09 11:02:59 +0100 |
---|---|---|
committer | Alex Harpin <development@landsofshadow.co.uk> | 2014-08-09 11:02:59 +0100 |
commit | 3cd370e33c2261142946cbeb37dcdd4baa130944 (patch) | |
tree | 8c40b48bfee511dc0bc465e34906759e3e328c96 /scripts | |
parent | 56846d1ccd66051ad85a70329b1988de74301988 (diff) | |
download | vyatta-op-vpn-3cd370e33c2261142946cbeb37dcdd4baa130944.tar.gz vyatta-op-vpn-3cd370e33c2261142946cbeb37dcdd4baa130944.zip |
vyatta-op-vpn: display the config path location for the rsa key file
The command "show vpn ike rsa-keys" currently displays the full system
file path rather than using the shorter config path. This sets it to
display the config path instead.
Bug #278 http://bugzilla.vyos.net/show_bug.cgi?id=278
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-show-vpn.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/vyatta-show-vpn.pl b/scripts/vyatta-show-vpn.pl index 80d08b4..720ba56 100755 --- a/scripts/vyatta-show-vpn.pl +++ b/scripts/vyatta-show-vpn.pl @@ -27,6 +27,7 @@ use strict; use warnings; use lib "/opt/vyatta/share/perl5/"; +use Vyatta::Misc qw(get_short_config_path); my $arg0 = $ARGV[0]; if (!defined($arg0)) { @@ -82,10 +83,11 @@ if ($arg0 eq 'rsa-keys') { die "No key file $key_file found.\n"; } my $pubkey = rsa_get_local_pubkey($key_file); + my $config_key_file = get_short_config_path($key_file); if ($pubkey eq 0) { die "No local pubkey found.\n"; } - print "\nLocal public key ($key_file):\n\n$pubkey\n\n"; + print "\nLocal public key ($config_key_file):\n\n$pubkey\n\n"; use Vyatta::Config; my $vc = new Vyatta::Config(); |