[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.44-755-ga3ab31d

Holger Levsen holger at layer-acht.org
Mon Jun 18 11:39:01 UTC 2012


The following commit has been merged in the piatti branch:
commit 1bd50918b10d2f84e26dc95ea667f40e8071ff51
Author: Holger Levsen <holger at layer-acht.org>
Date:   Mon Jun 18 11:19:29 2012 +0000

    using triggers is the real solution but until then, duct-tape-fix slave installation failure

diff --git a/debian/piuparts-slave.postinst b/debian/piuparts-slave.postinst
index 070ef51..a8e392f 100755
--- a/debian/piuparts-slave.postinst
+++ b/debian/piuparts-slave.postinst
@@ -46,9 +46,11 @@ case "$1" in
               $userhome/$suser/.ssh/id_rsa.pub
     fi
 
-    cat $userhome/$suser/.ssh/id_rsa.pub >>$userhome/$muser/.ssh/authorized_keys
-    chown $muser:$pgroup $userhome/$muser/.ssh/authorized_keys
-    chmod 0600 $userhome/$muser/.ssh/authorized_keys
+    if [ -d $userhome/$muser/.ssh ] ; then
+        cat $userhome/$suser/.ssh/id_rsa.pub >>$userhome/$muser/.ssh/authorized_keys
+        chown $muser:$pgroup $userhome/$muser/.ssh/authorized_keys
+        chmod 0600 $userhome/$muser/.ssh/authorized_keys
+    fi
 
     install -d -o $suser -g $pgroup -m 0755 $userhome/slave
     install -d -o $suser -g $pgroup -m 0755 $userhome/slave/0

-- 
piuparts git repository



More information about the Piuparts-commits mailing list