ssh-copy-id was throwing errors from mktemp. We add this workaround so things can...
authorAndy Witter <awitter@georgialibraries.org>
Thu, 14 Jan 2016 20:37:18 +0000 (15:37 -0500)
committerAndy Witter <awitter@georgialibraries.org>
Thu, 14 Jan 2016 20:37:18 +0000 (15:37 -0500)
templates/setup_sshkeys.sh

index 0200953..f95bc16 100755 (executable)
@@ -35,6 +35,16 @@ if cat /etc/passwd |grep -q opensrf
                        echo
        fi
        
+       if [ ! -d "$HOME/.ssh" ] ### Workaround for ssh-copy-id mktemp errors.
+                then
+                mkdir ~/.ssh
+                if [ ! -z $SUDO_USER ]
+                        then
+                        chown $SUDO_USER.$SUDO_USER ~/.ssh
+                fi
+
+        fi
+       
        for NODE in $(cat opensrf_nodes.txt)
                do
                echo