From 5e68c8d2c993b3d485034703d93e22fd80e1fdd7 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Fri, 14 Nov 2008 23:15:31 +0100 Subject: [PATCH 1/1] ud-replicate: Only link ssh-rsa-shadow to var/lib/misc/$host and etc/ssh if it exists. Else remove the symlink. --- debian/changelog | 7 +++++++ ud-replicate | 11 +++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 50b13ee..ee5c53b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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. diff --git a/ud-replicate b/ud-replicate index aaab9f5..7228815 100755 --- a/ud-replicate +++ b/ud-replicate @@ -72,10 +72,13 @@ fi 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 -- 2.20.1