Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NTP problems




On Oct 27, 2004, at 8:42 AM, John Mundt wrote:
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.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macos-x-server/email@hidden

This email sent to email@hidden
References: 
 >NTP problems (From: Jason Roos <email@hidden>)
 >Re: NTP problems (From: "Steven Kolins" <email@hidden>)
 >Re: NTP problems (From: John Mundt <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.