summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-02-02 14:55:44 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-02-02 14:55:44 -0800
commit433feb9b22c62c236be6d7738591a6bb3a5ae9ae (patch)
tree73ea890ddde223f3fc4edd2b6047d16ff9ebe408
parent4ed59b9f9abe50e14bfdabe6cf85777444bb2bcc (diff)
downloadvyatta-cfg-system-433feb9b22c62c236be6d7738591a6bb3a5ae9ae.tar.gz
vyatta-cfg-system-433feb9b22c62c236be6d7738591a6bb3a5ae9ae.zip
Bug in handling local key file
When URL was added, local file read got broken!
-rwxr-xr-xscripts/vyatta-load-user-key.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/vyatta-load-user-key.pl b/scripts/vyatta-load-user-key.pl
index 9b84ab2a..32af1af2 100755
--- a/scripts/vyatta-load-user-key.pl
+++ b/scripts/vyatta-load-user-key.pl
@@ -69,7 +69,7 @@ sub geturl {
$cmd .= " $url";
open (my $curl, "$cmd |" )
- or die "$cmd command failed: $!\n";
+ or die "$cmd command failed: $!";
return $curl;
}
@@ -90,8 +90,8 @@ die "User $user does not exist in current configuration\n"
my $in;
if ( $source =~ m#(^[^/]\w+)://# ) {
$in = geturl ($1, $source);
-} else {
- open(my $in, '<', $source)
+} else {
+ open($in, '<', $source)
or die "Cannot open file $source: $!\n";
}