vmware-archive / usb-login-scripts

A formal repository for the scripts we use on our SSH-loading USB sticks
Apache License 2.0
28 stars 10 forks source link

autoexpire script has wrong path to id_rsa #10

Closed cjcjameson closed 7 years ago

cjcjameson commented 7 years ago

https://github.com/pivotal/usb-login-scripts/blob/4bbe548a7f149ed48cd34e0505bebf6585ebfc91/scripts-autoexpire/xload.sh#L5 ends up one directory too far in

Rather than re-pathing at that point in the script, it'd probably be better to respect the SSH_KEY_FILE variable that's provided from the installed load script

Thanks to @nadeemg for uncovering!

davidje13 commented 7 years ago

D'oh. Agreed; I'll patch it to use the same as the "full" script: "${SSH_KEY_FILE:-$ABSDIR/id_rsa}" (i.e. fall-back to expecting the id_rsa to be in the same directory as the script if not given, which would only be the case if people invoke it directly, most likely due to just copying the script on its own)

davidje13 commented 7 years ago

Fixed in scripts-autoexpire and scripts-original!