[Da-tools-commits] ./debian/userdir-ldap r476: ud-replicate: Only link ssh-rsa-shadow to var/lib/misc/$host and etc/ssh if it exists. Else remove the symlink.

Peter Palfrader peter at palfrader.org
Fri Nov 14 22:15:31 UTC 2008


------------------------------------------------------------
revno: 476
committer: Peter Palfrader <peter at palfrader.org>
branch nick: userdir-ldap
timestamp: Fri 2008-11-14 23:15:31 +0100
message:
  ud-replicate: Only link ssh-rsa-shadow to var/lib/misc/$host and etc/ssh if it exists.  Else remove the symlink.
modified:
  debian/changelog
  ud-replicate
-------------- next part --------------
=== modified file 'debian/changelog'
--- a/debian/changelog	2008-11-14 22:05:23 +0000
+++ b/debian/changelog	2008-11-14 22:15:31 +0000
@@ -1,3 +1,10 @@
+userdir-ldap (0.3.49) unstable; urgency=low
+
+  * ud-replicate: Only link ssh-rsa-shadow to var/lib/misc/$host and etc/ssh
+    if it exists.  Else remove the symlink.
+
+ -- Peter Palfrader <weasel at debian.org>  Fri, 14 Nov 2008 23:14:58 +0100
+
 userdir-ldap (0.3.48) unstable; urgency=low
 
   * ud-generate: Remove support for single ssh key shadow file.

=== modified file 'ud-replicate'
--- a/ud-replicate	2008-10-26 21:32:16 +0000
+++ b/ud-replicate	2008-11-14 22:15:31 +0000
@@ -72,10 +72,13 @@
 makedb "$HOST/group.tdb" -o group.db.t
 mv -f passwd.db.t passwd.db
 mv -f group.db.t group.db
-for a in $HOST/ssh-rsa-shadow $HOST/ssh_known_hosts; do
-	ln -sf $a .
-done
-ln -sf `pwd -P`/ssh-rsa-shadow /etc/ssh
+if [ -e "$HOST/ssh-rsa-shadow" ]; then
+	ln -sf $HOST/ssh-rsa-shadow .
+	ln -sf `pwd -P`/ssh-rsa-shadow /etc/ssh
+else
+	rm -f ssh-rsa-shadow /etc/ssh/ssh-rsa-shadow
+fi
+ln -sf $HOST/ssh_known_hosts .
 ln -sf `pwd -P`/ssh_known_hosts /etc/ssh
 
 if [ -e ${HOST}/ssh-keys.tar.gz ]; then



More information about the Da-tools-commits mailing list