Hello community, here is the log from the commit of package ntp checked in at Fri Oct 24 15:21:56 CEST 2008. -------- --- ntp/ntp.changes 2008-10-23 09:02:04.000000000 +0200 +++ /mounts/work_src_done/STABLE/ntp/ntp.changes 2008-10-24 09:31:20.000000000 +0200 @@ -1,0 +2,6 @@ +Fri Oct 24 09:30:06 CEST 2008 - varkoly@suse.de + +- Add ntp-wait script. This tests if the time is synchronized. + Very important for time critical services like kerberos. + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- ntp-wait ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ntp.spec ++++++ --- /var/tmp/diff_new_pack.t29557/_old 2008-10-24 15:21:16.000000000 +0200 +++ /var/tmp/diff_new_pack.t29557/_new 2008-10-24 15:21:16.000000000 +0200 @@ -27,7 +27,7 @@ License: BSD 3-Clause Group: Productivity/Networking/Other Version: 4.2.4p5 -Release: 10 +Release: 11 Summary: Network Time Protocol daemon (version 4) # main source Source0: ntp-%{version}.tar.bz @@ -46,6 +46,7 @@ Source13: ntp-4.2.0-rh-manpages.tar.gz Source14: ntp.xml Source15: ntpdate +Source16: ntp-wait Patch1: ntp-segfault_on_invalid_device.patch Patch2: ntp-linuxcaps.patch Patch3: ntp-ntptrace_doc.patch @@ -278,6 +279,7 @@ install -d %{buildroot}/usr/share/omc/svcinfo.d/ install -m 644 %{S:14} %{buildroot}/usr/share/omc/svcinfo.d/ install -m 755 %{S:15} %{buildroot}/usr/sbin/ +install -m 755 %{S:16} %{buildroot}/usr/sbin/ %clean %__rm -rf %{buildroot} @@ -371,6 +373,9 @@ %doc html/* %changelog +* Fri Oct 24 2008 varkoly@suse.de +- Add ntp-wait script. This tests if the time is synchronized. + Very important for time critical services like kerberos. * Thu Oct 23 2008 varkoly@suse.de - (bnc#437982) - /usr/sbin/ntpdate: line 27: shift: -1: shift count out of range - (bnc#437968) - Typo and usability issue in deprecation output of ntpdate ++++++ ntp-wait ++++++ #! /usr/bin/perl -w die "perl5 needed\n" unless ($] > 5); use Getopt::Std; $opt_h = 0; # Print help message $opt_f = 0; # 'Hard' failure if 'state' is unknown $opt_n = 1000; # How many tries before we give up? (10 min+) $opt_s = 6; # Seconds to sleep between tries (6s = 10/min) $opt_v = 0; # Be verbose? getopts('hfn:s:v'); $cmd = 'ntpq -c "rv 0 state"'; $| = 1; # Autoflush output. if( $opt_h ) { print "\nUsage: ntp-wait [ options ]\n\n". " -h Print this message\n". " -f 'Hard' failure if 'state' is unknown\n". " -n How many tries before we give up? Default 1000 (ca 10 min)\n". " -s Seconds to sleep between tries. Default 6.\n". " -v Be verbose\n\n"; exit 0; } print "Waiting for ntpd to synchronize... " if ($opt_v); for ($i = 0; $i < $opt_n; ++$i) { open(Q, $cmd." 2>&1 |") || die "Can't start ntpq: $!"; while(<Q>) { if (/^state=4/) { print "\bOK!\n" if ($opt_v); exit 0; } if (/request variable was unknown/) { print "\bCan't tell!\nPerhaps you are running an old version of ntpd.\n" if ($opt_v); exit $opt_f; } if (/Connection refused/) { print "\bntpd is not running!\n" if ($opt_v); exit 1; } } close(Q); print "\b".substr("*+:.", $i % 4, 1) if ($opt_v); sleep($opt_s); } print "\bNo!\nntpd did not synchronize.\n" if ($opt_v); exit 1; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org