Changeset 10986 in genesis for tools


Ignore:
Timestamp:
May 22, 2012, 10:34:19 PM (13 years ago)
Author:
rick
Message:

The whole idea of an NTP pool is that hosts resolv to _different_ pools of IP's
else the ntp daemon not use the entry.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r10983 r10986  
    12931293      else:
    12941294        wleiden_cname[k] = item
     1295
     1296  # Hack to get dynamic pool listing
     1297  def chunks(l, n):
     1298      return [l[i:i+n] for i in range(0, len(l), n)]
     1299
     1300  ntp_servers = [x[0] for x in get_nameservers()]
     1301  for id, chunk in enumerate(chunks(ntp_servers,(len(ntp_servers)/4))):
     1302    for ntp_server in chunk:
     1303      wleiden_zone['%i.pool.ntp' % id].append((ntp_server, False))
    12951304
    12961305  details = dict()
Note: See TracChangeset for help on using the changeset viewer.