[Da-tools-commits] ./da-tools/userdir-ldap-sshkeys r393: ahem, we need to actually look in the host subdir

Stephen Gran steve at lobefin.net
Wed May 14 21:27:10 UTC 2008


------------------------------------------------------------
revno: 393
committer: Stephen Gran <steve at lobefin.net>
branch nick: userdir-ldap-sshkeys
timestamp: Wed 2008-05-14 22:27:10 +0100
message:
  ahem, we need to actually look in the host subdir
modified:
  ud-replicate
-------------- next part --------------
=== modified file 'ud-replicate'
--- a/ud-replicate	2008-05-14 20:52:22 +0000
+++ b/ud-replicate	2008-05-14 21:27:10 +0000
@@ -76,12 +76,14 @@
 ln -sf `pwd -P`/ssh-rsa-shadow /etc/ssh
 ln -sf `pwd -P`/ssh_known_hosts /etc/ssh
 
-if [ -e ssh-keys.tar.gz ]; then
+if [ -e ${HOST}/ssh-keys.tar.gz ]; then
   export TMPDIR='/tmp/' 
   tempdir=$(mktemp -d)
   old=$(pwd -P)
-  cd $tempdir && tar -xvf $old/ssh-keys.tar.gz
+  cd $tempdir && tar -xvf ${old}/${HOST}/ssh-keys.tar.gz
+  cd old
   mkdir userkeys 2> /dev/null || true
+  chmod 755 $tempdir
   rsync -av --delete-after $tempdir/ userkeys/
 fi
 



More information about the Da-tools-commits mailing list