Changeset 2053 in ProjectBuilder


Ignore:
Timestamp:
Feb 21, 2016, 2:44:01 PM (8 years ago)
Author:
Bruno Cornec
Message:
  • Improve error handling for bad ssh key detection
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r2052 r2053  
    45284528    $keyfile = "$ENV{'HOME'}/.ssh/pb_ecdsa" if ((-s "$ENV{'HOME'}/.ssh/pb_ecdsa") && ($ecdsa != 0));
    45294529}
    4530 die "Unable to find your public ssh key under $ENV{'HOME'}/.ssh" if (not defined $keyfile);
    4531 pb_log(2,"Using ssh key file $keyfile\n");
     4530if (defined $keyfile) {
     4531    pb_log(2,"Using ssh key file $keyfile\n");
     4532} else {
     4533    pb_log(0, "Unable to find your public ssh key under $ENV{'HOME'}/.ssh\n");
     4534}
    45324535return($keyfile);
    45334536}
     
    49474950# Prepare the key to be used and transfered remotely
    49484951$keyfile = pb_ssh_get(1,$vmhost->{$ENV{'PBPROJ'}},$nport);
     4952return if (not defined $keyfile);
    49494953
    49504954# We call true to avoid problems if SELinux is not activated, but chcon is present and returns in that case 1
Note: See TracChangeset for help on using the changeset viewer.