From 433feb9b22c62c236be6d7738591a6bb3a5ae9ae Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 2 Feb 2010 14:55:44 -0800 Subject: Bug in handling local key file When URL was added, local file read got broken! --- scripts/vyatta-load-user-key.pl | 6 +++--- 1 file 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"; } -- cgit v1.2.3