summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMohit Mehta <mohit@vyatta.com>2011-05-04 17:43:30 -0700
committerMohit Mehta <mohit@vyatta.com>2011-05-04 17:43:30 -0700
commit1347338c9ed445cd7fd678bf37d5ac8958e783b8 (patch)
treebc3ca880d2f68290254051263c07af26af056a76 /scripts
parent279b0fa9490432ed4ebc87792d34fd315d53566b (diff)
downloadvyatta-op-vpn-1347338c9ed445cd7fd678bf37d5ac8958e783b8.tar.gz
vyatta-op-vpn-1347338c9ed445cd7fd678bf37d5ac8958e783b8.zip
Fix Bug 7010 Update commands to save/retrieve files from /config
* use shorter /config path when presenting configuration directory to users
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gen_local_rsa_key.pl7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/gen_local_rsa_key.pl b/scripts/gen_local_rsa_key.pl
index 9bf914c..4f800ab 100755
--- a/scripts/gen_local_rsa_key.pl
+++ b/scripts/gen_local_rsa_key.pl
@@ -27,7 +27,7 @@ use strict;
use warnings;
use lib "/opt/vyatta/share/perl5/";
use Vyatta::VPN::Util;
-
+use Vyatta::Misc qw(get_short_config_path);
# Defaults
my $bits = 2192;
@@ -93,7 +93,10 @@ $cmd = "/usr/lib/ipsec/newhostkey --output $local_key_file --bits $bits";
#
$cmd .= " --random $device";
-print "Generating rsa-key to $local_key_file\n";
+# when presenting to users, show shortened /config path
+my $shortened_cfg_path_file = get_short_config_path($local_key_file);
+print "Generating rsa-key to $shortened_cfg_path_file\n";
+
vpn_debug $cmd;
$rc = system($cmd);
if ($rc != 0) {