# HG changeset patch # User Pascal Bellard # Date 1287831238 -7200 # Node ID fdc7f9d423dddfa57c52618a2a173cb786cc462c # Parent fe3b270b9fc7d75bbf48fb237890df8d1193a352 ntpclient: one call in crontab only diff -r fe3b270b9fc7 -r fdc7f9d423dd ntpclient/receipt --- a/ntpclient/receipt Sat Oct 23 03:58:25 2010 +0000 +++ b/ntpclient/receipt Sat Oct 23 12:53:58 2010 +0200 @@ -45,9 +45,10 @@ srv="fr.pool.ntp.org" echo "" echo -n "Setting up crontab for ntpclient..." - crontab - -u root << EOT + crontab -l 2> /dev/null | grep -q '/usr/bin/ntpclient -s -h' || + crontab - -u root << EOT $(crontab -l 2> /dev/null) -0 0 * * * $root/usr/bin/ntpclient -s -h $srv +0 0 * * * /usr/bin/ntpclient -s -h $srv EOT status else