# The rsync source host needs to be customized..
set -e
-exec > /dev/null 2>&1
+# Without effect on the commandline
+if [ -z "$PS1" -o "$TERM" ]
+then
+ exec > /dev/null 2>&1
+ verbose=-v
+fi
HOST=`hostname -f`
cd /tmp/
cd /var/lib/misc || cd /var/state/glibc/ || cd /var/db/
lockfile -r 1 -l 3600 lock
trap "rm -f lock" exit
-rsync -e ssh -rp "sshdist@samosa:/var/cache/userdir-ldap/hosts/$HOST" .
+case $HOST in
+*samosa*)
+ udhost=;;
+*)
+ udhost="sshdist@samosa:";;
+esac
+rsync ${verbose} -e ssh -rp "${udhost}/var/cache/userdir-ldap/hosts/$HOST" .
makedb "$HOST/passwd.tdb" -o passwd.db.t
(umask 027 && makedb "$HOST/shadow.tdb" -o shadow.db.t)
chown root.shadow shadow.db.t; chmod 0640 shadow.db.t
fi
if [ -d "/etc/postfix" -a -f "$HOST/forward-alias" ]; then
sed -e 's/:/@debian.org/' $HOST/forward-alias > /etc/postfix/debian
- postmap sdbm:/etc/postfix/debian < /etc/postfix/debian &> /dev/null || true
+ /usr/sbin/postmap hash:/etc/postfix/debian < /etc/postfix/debian || true
fi