You'd also lose your drift file, etc....
That's easy to solve. Instead of using awk, use grep piped to
sed. That would allow you to do things like:
grep -i '^server' /etc/ntp.conf | grep -vi '^server 127.127'
| sed 's/^server/addserver/'
grep -i '^peer' /etc/ntp.conf | sed 's/^peer/addpeer/'
Thus, leaving the rest of the configuration line unchanged.
For the unconfig stuff, you should probably leave configured any
"local" servers, i.e., servers that are on the same network according
to the IP address/netmask of the affected interface.
My understanding is that Dave hates ntpdc. We're trying to work
on a way to incorporate all that functionality into ntpq, but I don't
know whether or not we'll be able to make it before ntpdc is shot
Brad Knowles, < XXXX@XXXXX.COM >
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
-Benjamin Franklin, Historical Review of Pennsylvania.
GCS/IT d+(-) s:+(++)>: a C++(+++)$ UMBSHI++++$ P+>++ L+ !E-(---) W+++(--) N+
!w--- O- M++ V PS++(+++) PE- Y+(++) PGP>+++ t+(+++) 5++(+++) X++(+++) R+(+++)
tv+(+++) b+(++++) DI+(++++) D+(++) G+(++++) e++>++++ h--- r---(+++)* z(+++)