Save a copy because each OS upgrade loves to step on the file, putting
yours into ntp.conf.applesaved.
This is a job for make (and optionally cvs).
On my servers, I have a cvs module with all my customized settings
files, and a Makefile. Then when I want to restore things, I checkout
the settings directory, cd in, and do something like "sudo make ntp",
where the Makefile looks like so:
# start example
clean:
@-rm .inst-*
.inst-ntp.conf: ntp.conf
sudo install -b -o root -g wheel -m 644 ntp.conf /etc/ntp.conf
# the -b tells it to copy the existing /etc/ntp.conf to
/etc/ntp.conf.old
touch .inst-ntp.conf
setntp: .inst-ntp.conf
sudo ntpdate servername
ntp: .inst-ntp.conf
# stop example
This makes hand-tweaked files a lot easier to deal with. In this
example, you can change the servers you're syncing to in your ntp.conf
file, then just do a "make setntp" and it'll automatically install the
new configuration file, preserving the current one in case of a screw
up, then sync your time to whatever servername you specified in the
setntp stanza.
I've been using make to handle configuration files like this for years.
jpb
--
Joe Block <email@hidden>
Computer Science is about lofty design goals and algorithmic
optimization. System Administration is about cleaning up the resulting
mess.