[wpkg-users] NTP time synchronisation
Marco Gaiarin
gaio at sv.lnf.it
Tue Dec 20 18:14:15 CET 2011
Mandi! Anthony Walters
In chel di` si favelave...
> Does anyone else use WPKG to dish out NTP time configuration
> settings, and care to put your package up here? I want to get a
> configuration nailed down and am wondering if i have missed
> something.
I use:
<package
id="ntp-settings"
name="ntp client configuration"
revision="20110517:1"
reboot="false"
priority="5">
<check type="registry" condition="equals" path="HKLM\System\CurrentControlSet\Services\W32Time\Start" value="2" />
<install cmd="sc config w32time start= auto" />
<install cmd="regedit /s %WPKGROOT%\packages\time-%LOCALNET%.reg" />
<install cmd="net time /setsntp:time.%LOCALNET%.lnf.it" />
<install cmd="net stop w32time" />
<install cmd="net start w32time" />
<install cmd="w32tm /resync /nowait" />
<upgrade cmd="sc config w32time start= auto" />
<upgrade cmd="regedit /s %WPKGROOT%\packages\time-%LOCALNET%.reg" />
<upgrade cmd="net time /setsntp:time.%LOCALNET%.lnf.it" />
<upgrade cmd="net stop w32time" />
<upgrade cmd="net start w32time" />
<upgrade cmd="w32tm /resync /nowait" />
<remove cmd="sc config w32time start= demand" />
<remove cmd="net stop w32time" />
</package>
Where the .reg file contains:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers]
@="0"
"1"="time.windows.com"
"2"="time.nist.gov"
"0"="time.sv.lnf.it"
Because i was never be able to set the list of ntp server using /setsntp or, like
your example, /manualpeerlist.
AFAIK, /setsntp works but the server have just to be present in the
list.
--
dott. Marco Gaiarin GNUPG Key ID: 240A3D66
Associazione ``La Nostra Famiglia'' http://www.sv.lnf.it/
Polo FVG - Via della Bontà, 7 - 33078 - San Vito al Tagliamento (PN)
marco.gaiarin(at)sv.lnf.it tel +39-0434-842711 fax +39-0434-842797
Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
http://www.lanostrafamiglia.it/chi_siamo/5xmille.php
(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)
More information about the wpkg-users
mailing list