From: Peter Palfrader Date: Wed, 16 Apr 2008 12:09:51 +0000 (+0200) Subject: Sleep for a random time, up to two minutes, in ud-replicate when not called X-Git-Tag: userdir-ldap-0.3.16~2 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=commitdiff_plain;h=722e3938d8f987fab2f64c64f9c0faf9285de91a Sleep for a random time, up to two minutes, in ud-replicate when not called interactively. This is to prevent DoSing the db server when many clients come at the same time. --- diff --git a/debian/changelog b/debian/changelog index cab31a4..5202505 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,9 @@ userdir-ldap (0.3.15+xxx) XXunstable; urgency=low inetOrgPerson, that doesn't work. * Add myself to uploaders. * Create /var/lib/misc/thishost as a symlink to the hostname in postinst. + * Sleep for a random time, up to two minutes, in ud-replicate when not + called interactively. This is to prevent DoSing the db server when + many clients come at the same time. [ Mark Hymers ] * ud-userimport, ud-groupadd, ud-roleadd, ud-useradd, userdir_ldap.py: @@ -61,7 +64,7 @@ userdir-ldap (0.3.15+xxx) XXunstable; urgency=low * Build manpages at build time (add Build-Depend on yodl) * Install built manpages - -- Peter Palfrader Wed, 16 Apr 2008 14:05:44 +0200 + -- Peter Palfrader Wed, 16 Apr 2008 14:08:55 +0200 userdir-ldap (0.3.15) unstable; urgency=low diff --git a/ud-replicate b/ud-replicate index 0c17297..094dd46 100755 --- a/ud-replicate +++ b/ud-replicate @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash # Copyright (c) 1999-2001 Jason Gunthorpe # Copyright (c) 2002-2003,2006 Ryan Murray @@ -24,6 +24,7 @@ set -e if [ -z "$TERM" -o "$TERM" = "dumb" ] then exec > /dev/null 2>&1 + sleep $(( $RANDOM % 120 )) else verbose=-v fi