And clean up the bugs I introduced while mucking with sgran's shell
[mirror/userdir-ldap.git] / ud-replicate
index 56dbbd2..d2a065f 100755 (executable)
@@ -80,8 +80,8 @@ ln -sf `pwd -P`/ssh_known_hosts /etc/ssh
 if [ -e ${HOST}/ssh-keys.tar.gz ]; then
   export TMPDIR='/tmp/'
   tempdir=$(mktemp -d)
-  (cd $tempdir && tar -xf ${old}/${HOST}/ssh-keys.tar.gz)
-  [ -d userkeys ] || mkdir userkeys
+  tar -C "$tempdir" -xf ${HOST}/ssh-keys.tar.gz
+  [ -d userkeys ] || mkdir userkeys
   chmod 755 $tempdir
   rsync -a --delete-after $tempdir/ userkeys/
 fi