summaryrefslogtreecommitdiff
path: root/templates/ntp.conf.archlinux.erb
blob: ef3b72511c88d6a04076654a60a5f13a46a7e3dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# With the default settings below, ntpd will only synchronize your clock.
#
# For details, see:
# - the ntp.conf man page
# - http://support.ntp.org/bin/view/Support/GettingStarted
# - https://wiki.archlinux.org/index.php/Network_Time_Protocol_daemon
#
<% if @panic == false -%>
# Keep ntpd from panicking in the event of a large clock skew
# # when a VM guest is suspended and resumed.
tinker panic 0
<% end -%>

# Associate to public NTP pool servers; see http://www.pool.ntp.org/
<% [@servers].flatten.each do |server| -%>
server <%= server %>
<% end -%>

<% if @restrict -%>
# Only allow read-only access from localhost
restrict default noquery nopeer
restrict 127.0.0.1
restrict ::1
<% end -%>

# Location of drift file
driftfile /var/lib/ntp/ntp.drift

# NOTE: If you run dhcpcd and have lines like 'restrict' and 'fudge' appearing
# here, be sure to add '-Y -N' to the dhcpcd_ethX variables in /etc/conf.d/net