Commits

Eric Dowd  committed 2096420

use uuidgen, if installed, to create suffix for keypair

  • Participants
  • Parent commits 6f9d923

Comments (0)

Files changed (1)

File build_gentoo.sh

 
 if [[ $key == "" || $keyfile == "" ]]; then
     report_status "set up key"
-    key="gentoo-bootstrap_$region-`date +%Y%m%d%H%M%S`"
+    which uuidgen 2>/dev/null 1>/dev/null
+    if [ $? -eq 0 ]; then
+        suffix=`uuidgen`
+    else
+        suffix=`date +%Y%m%d%H%M%S`
+    fi
+    key="gentoo-bootstrap_${region}-${suffix}"
     keyfile="${key}.pem"
    
     if [ ! -f $keyfile ]; then