ud-replicate: use persistent ssh connections
authorPeter Palfrader <peter@palfrader.org>
Thu, 19 Nov 2015 08:52:59 +0000 (09:52 +0100)
committerPeter Palfrader <peter@palfrader.org>
Thu, 19 Nov 2015 08:52:59 +0000 (09:52 +0100)
debian/changelog
ud-replicate

index 42d965f..bbda98b 100644 (file)
@@ -7,11 +7,12 @@ userdir-ldap (0.3.87) UNRELEASED; urgency=medium
   * ud-guest-upgrade: add.
   * ud-guest-extend: add
   * ud-replicate: only install/reload RTC files when they have changed.
+  * ud-replicate: use persistent ssh connections.
 
   [ Paul Wise ]
   * Update ud-ldapshow and cleanup cruft around the usergroups changes
 
- -- Peter Palfrader <weasel@debian.org>  Thu, 19 Nov 2015 09:23:09 +0100
+ -- Peter Palfrader <weasel@debian.org>  Thu, 19 Nov 2015 09:52:43 +0100
 
 userdir-ldap (0.3.86) unstable; urgency=medium
 
index 11291f7..23dc9fa 100755 (executable)
@@ -74,7 +74,7 @@ if [ -e /var/lib/misc/thishost/dns-zone ]; then
   cp /var/lib/misc/thishost/dns-zone $tempfile2
 fi
 
-rsync ${verbose} --delete-after --times -e 'ssh -i /etc/ssh/ssh_host_rsa_key -o BatchMode=yes' -rp "${udhost}/var/cache/userdir-ldap/hosts/$HOST" .
+rsync ${verbose} --delete-after --times -e 'ssh -i /etc/ssh/ssh_host_rsa_key -o ControlPath=/var/run/.ud-replicate.ssh.socket -o ControlMaster=auto -o ControlPersist=2h -o BatchMode=yes' -rp "${udhost}/var/cache/userdir-ldap/hosts/$HOST" .
 
 makedb "$HOST/passwd.tdb" -o passwd.db.t
 if [ -s "$HOST/shadow.tdb" ]