From 57a8729ba565d03bda5c3d96c0ad6265562da677 Mon Sep 17 00:00:00 2001 From: James Meyer <James.meyer@operamail.com> Date: Sat, 7 Feb 2009 13:50:17 -0600 Subject: No longer overwrite ntp.conf for MBE/STANDALONE Change out pool.ntp.org for dbhost for FE --- abs/core-testing/LinHES-config/PKGBUILD | 2 +- abs/core-testing/LinHES-config/systemconfig.sh | 29 ++------- abs/core-testing/ntp/PKGBUILD | 2 +- abs/core-testing/ntp/ntp-client.conf | 3 +- abs/core-testing/ntp/ntp.conf | 81 ++++++++++++++------------ 5 files changed, 54 insertions(+), 63 deletions(-) diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD index 40914cf..b8fbb9a 100755 --- a/abs/core-testing/LinHES-config/PKGBUILD +++ b/abs/core-testing/LinHES-config/PKGBUILD @@ -1,6 +1,6 @@ pkgname=LinHES-config pkgver=1.0 -pkgrel=237 +pkgrel=240 conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev ) pkgdesc="Install and configure your system" depends=(bc libstatgrab mysql-python expect curl dnsutils parted sg3_utils nmbscan ) diff --git a/abs/core-testing/LinHES-config/systemconfig.sh b/abs/core-testing/LinHES-config/systemconfig.sh index 9f4df7a..06402a6 100755 --- a/abs/core-testing/LinHES-config/systemconfig.sh +++ b/abs/core-testing/LinHES-config/systemconfig.sh @@ -371,32 +371,15 @@ function setupnciddaemon { } function setupntp () { -cat > ${BASE}/etc/ntp.conf << EOF -# default restrictions -restrict default noquery notrust nomodify -# NTP drift file - used to keep track of your system clocks -# time deviation -driftfile /etc/ntp.drift - -# NTP log file -logfile /var/log/ntp.log -# override the default restrictions here, servers that can query -restrict 192.168.0.0 mask 255.255.0.0 nomodify -restrict 10.0.0.0 mask 255.0.00 nomodify - -#servers to sync with -EOF #this is used for backend or standlone types - if [ $1 = "1" ] + if [ $1 = "1" ] then - echo "server pool.ntp.org" >> ${BASE}/etc/ntp.conf - #echo "server ntp3.sf-bay.org" >> ${BASE}/etc/ntp.conf - echo "restrict pool.ntp.org" >> ${BASE}/etc/ntp.conf - #echo "restrict ntp3.sf-bay.org noquery nomodify" >> ${BASE}/etc/ntp.conf - + #MBE/STD use deafult + echo "Not changing ntp config" else - echo "server $dbhost" >> ${BASE}/etc/ntp.conf - echo "restrict $dbhost noquery nomodify" >> ${BASE}/etc/ntp.conf + #echo "server $dbhost" >> ${BASE}/etc/ntp.conf + echo "setting ntp to $dbhost" + sed -i "s/pool.ntp.org/$dbhost/g" ${BASE}/etc/ntp.conf fi diff --git a/abs/core-testing/ntp/PKGBUILD b/abs/core-testing/ntp/PKGBUILD index 3b60cdf..fc568b0 100755 --- a/abs/core-testing/ntp/PKGBUILD +++ b/abs/core-testing/ntp/PKGBUILD @@ -1,6 +1,6 @@ pkgname=ntp pkgver=4.2.4p5 -pkgrel=1 +pkgrel=3 pkgdesc="NTP (Network Time Protocol) tries to keep servers in sync" arch=(i686 x86_64) url="http://www.ntp.org/" diff --git a/abs/core-testing/ntp/ntp-client.conf b/abs/core-testing/ntp/ntp-client.conf index 4acabee..ace4daf 100755 --- a/abs/core-testing/ntp/ntp-client.conf +++ b/abs/core-testing/ntp/ntp-client.conf @@ -1,6 +1,5 @@ # change this to a server closer to your location -#NTP_CLIENT_SERVER="pool.ntp.org" -NTP_CLIENT_SERVER="ntp1.cs.wisc.edu" +NTP_CLIENT_SERVER="pool.ntp.org" # client options NTP_CLIENT_OPTION="-b -u" diff --git a/abs/core-testing/ntp/ntp.conf b/abs/core-testing/ntp/ntp.conf index e2c20e5..9411643 100755 --- a/abs/core-testing/ntp/ntp.conf +++ b/abs/core-testing/ntp/ntp.conf @@ -1,48 +1,57 @@ -# NOTES: -# - you should only have to update the server line below -# - if you start getting lines like 'restrict' and 'fudge' -# and you didnt add them, AND you run dhcpcd on your -# network interfaces, be sure to add '-Y -N' to the -# dhcpcd_ethX variables in /etc/conf.d/net +# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help -# Name of the servers ntpd should sync with -# Please respect the access policy as stated by the responsible person. -#server ntp.example.tld iburst +#driftfile /var/lib/ntp/ntp.drift +driftfile /etc/ntp.drift -#server pool.ntp.org -server ntp1.cs.wisc.edu -## -# A list of available servers can be found here: -# http://www.pool.ntp.org/ -# http://www.pool.ntp.org/#use -# A good way to get servers for your machine is: -# netselect -s 3 pool.ntp.org -## +# Enable this if you want statistics to be logged. +#statsdir /var/log/ntpstats/ -# you should not need to modify the following paths -driftfile /var/lib/ntp/ntp.drift +statistics loopstats peerstats clockstats +filegen loopstats file loopstats type day enable +filegen peerstats file peerstats type day enable +filegen clockstats file clockstats type day enable -#server ntplocal.example.com prefer -#server timeserver.example.org -# Warning: Using default NTP settings will leave your NTP -# server accessible to all hosts on the Internet. +# You do need to talk to an NTP server or two (or three). +#server ntp.your-provider.example -# If you want to deny all machines (including your own) -# from accessing the NTP server, uncomment: -#restrict default ignore +# pool.ntp.org maps to about 1000 low-stratum NTP servers. Your server will +# pick a different set every time it starts up. Please consider joining the +# pool: <http://www.pool.ntp.org/join.html> +server pool.ntp.org +server 0.us.pool.ntp.org iburst +server 1.us.pool.ntp.org iburst +server 2.us.pool.ntp.org iburst +server 3.us.pool.ntp.org iburst -# To deny other machines from changing the -# configuration but allow localhost: -restrict default nomodify nopeer +# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for +# details. The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions> +# might also be helpful. +# +# Note that "restrict" applies to both servers and clients, so a configuration +# that might be intended to block requests from certain clients could also end +# up blocking replies from your own upstream servers. + +# By default, exchange time with everybody, but don't allow configuration. +restrict -4 default kod notrap nomodify nopeer noquery +restrict -6 default kod notrap nomodify nopeer noquery + +# Local users may interrogate the ntp server more closely. restrict 127.0.0.1 +restrict ::1 +# Clients from this (example!) subnet have unlimited access, but only if +# cryptographically authenticated. +#restrict 192.168.123.0 mask 255.255.255.0 notrust -# To allow machines within your network to synchronize -# their clocks with your server, but ensure they are -# not allowed to configure the server or used as peers -# to synchronize against, uncomment this line. -# -restrict 192.168.0.0 mask 255.255.255.0 nomodify nopeer notrap + +# If you want to provide time to your local subnet, change the next line. +# (Again, the address is an example only.) +#broadcast 192.168.123.255 + +# If you want to listen to time broadcasts on your local subnet, de-comment the +# next lines. Please do this only if you trust everybody on the network! +#disable auth +#broadcastclient \ No newline at end of file -- cgit v0.12