missing .ssh directory

Added a check to see if /root/.ssh exists prior to pushd (also creates dir with correct perms if it doesn't).
This commit is contained in:
paul
2014-11-18 13:32:04 -06:00
parent 9a163937cc
commit 6a07553a17

View File

@@ -102,6 +102,10 @@ if [ -f "/opt/swap.sh" ];then
fi
# Make the system key used for bootstrapping self
if [ ! -d /root/.ssh ];then
mkdir -p /root/.ssh
chmod 700 /root/.ssh
fi
pushd /root/.ssh/
if [ ! -f "id_rsa" ];then
key_create