]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
storage_deploy.sh: fix access rights to rsa file
authorThilo Fromm <thilo.fromm@profitbricks.com>
Thu, 25 Apr 2013 14:14:27 +0000 (16:14 +0200)
committerMathias Klette <mathias.klette@profitbricks.com>
Tue, 30 Apr 2013 13:18:06 +0000 (15:18 +0200)
Signed-off-by: Thilo Fromm <thilo.fromm@profitbricks.com>
storage_deploy.sh

index 47b2f0055206c113a54d1ade3572530677923bf4..9668f8ccdb521c2ef87348c0fdc0dcfb80f995db 100755 (executable)
@@ -10,6 +10,12 @@ log() {
 }
 # ----
 
+prepare() {
+    chmod 600 id_rsa.storage-auto-deploy
+}
+# ----
+
+
 rexec() {
     local srv="$1" ; shift
 
@@ -116,6 +122,8 @@ main() {
     local storage_ip="$1"
     local storage_ipmi="$2"
 
+    prepare
+
     log "    Resetting $storage_ip and booting from PXE (via $storage_ipmi)"
     ipmi "$storage_ipmi" chassis bootdev pxe || { log "    FAILED to set bootdev pxe via ipmi."; return 1; }
     ipmi "$storage_ipmi" chassis power reset || { log "    FAILED to reset server via ipmi."; return 1; }