Changeset 10053 in genesis


Ignore:
Timestamp:
Mar 7, 2012, 10:08:06 PM (13 years ago)
Author:
rick
Message:

Serious hacking and cleanups to get all keys in the right format and stored to the proper files.

Please do mind that I remove the Bullet2,etc... information now, I will dynamically add this at an later stage.

Related-To: ticket:117

Files:
31 edited

Legend:

Unmodified
Added
Removed
  • nodes/CNodeAJSoft1/wleiden.conf

    r10047 r10053  
    7575ESSID=il-zw.rv.wleiden.net
    7676CHANNEL=4
    77 Bullet2_MAC=00:15:6D:E8:F9:B1
    78 Bullet2_IP=172.16.4.67/29
     77NS_MAC=00:15:6D:E8:F9:B1
     78NS_IP=172.16.4.67/29
    7979UE0
  • nodes/CNodeAJSoft2/wleiden.conf

    r10047 r10053  
    7474ESSID=il-nno.ajsoft2.wleiden.net
    7575CHANNEL=8
    76 Bullet2_MAC=00:15:6D:E8:F9:C6
    77 Bullet2_IP=172.16.6.50/29
     76NS_MAC=00:15:6D:E8:F9:C6
     77NS_IP=172.16.6.50/29
    7878UE0
  • nodes/CNodeBCSte/wleiden.conf

    r10047 r10053  
    4444ESSID=il-nw.bcste.wleiden.net
    4545CHANNEL=1
    46 BulletMAC= 00:15:6D:E8:E6:9F
    47 BulletIP=172.16.3.250/29
     46NS_MAC= 00:15:6D:E8:E6:9F
     47NS_IP=172.16.3.250/29
    4848VR1
    4949
  • nodes/CNodeCam/wleiden.conf

    r10047 r10053  
    4141MODE=bridge station
    4242ESSID=n-o.unigor.wleiden.net
    43 Bullet2_IP=172.16.16.131/29
    44 Nullet2_MAC=00:15:6D:E9:E7:60
     43NS_IP=172.16.16.131/29
     44NS_MAC=00:15:6D:E9:E7:60
    4545CHANNEL=7
    4646VR1
  • nodes/CNodeGrip/wleiden.conf

    r10048 r10053  
    4848CHANNEL=52
    4949DHCP=no
    50 Bullet2_IP=192.168.1.20/24
    51 Bullet2_MAC=00:15:6D:AD:34:35
     50NS_IP=192.168.1.20/24
     51NS_MAC=00:15:6D:AD:34:35
    5252VR1
    5353
     
    6464CHANNEL=8
    6565DHCP=no
    66 Bullet2_IP=192.168.1.20/24
    67 Bullet2_MAC=00:15:6D:30:29:6B
     66NS_IP=192.168.1.20/24
     67NS_MAC=00:15:6D:30:29:6B
    6868VR2
    6969
  • nodes/CNodeHofwijck/wleiden.conf

    r10047 r10053  
    4242ESSID=il-w.hofwijck.wleiden.net
    4343CHANNEL=3
    44 Bullet_IP=172.16.6.26
    45 BulletMAC=00:15:6D:E8:E7:37
     44NS_IP=172.16.6.26
     45NS_MAC=00:15:6D:E8:E7:37
    4646VR0
    4747
  • nodes/CNodeHoutmarkt/wleiden.conf

    r10047 r10053  
    7575DHCP=140-190
    7676CHANNEL=8
    77 BulletIP=172.19.8.130
    78 BulletMAC=00:15:6D:30:28:4E
     77NS_IP=172.19.8.130
     78NS_MAC=00:15:6D:30:28:4E
    7979VR2
    8080
  • nodes/CNodeHuub/wleiden.conf

    r10047 r10053  
    8989SDESC=2ap2
    9090DHCP=140-180
    91 BULLET2_IP=172.17.16.130/26
    92 BULLET2_MAC= 00:15:6D:D4:F8:24
     91NS_IP=172.17.16.130/26
     92NS_MAC= 00:15:6D:D4:F8:24
    9393SIS4
  • nodes/CNodeIMI/wleiden.conf

    r10047 r10053  
    6666ESSID=il-zo.imi.wleiden.net
    6767CHANNEL=4
    68 Bullet2_MAC=00:15:6D:E8:F9:DE
    69 Bullet2_IP=172.16.5.250/29
     68NS_MAC=00:15:6D:E8:F9:DE
     69NS_IP=172.16.5.250/29
    7070VR2
    7171
     
    9595SDESC=2lvlz
    9696DHCP=no
    97 Bullet2_MAC=00:15:6D:E8:F9:B8
    98 Bullet2_IP=172.16.5.2/29
     97NS_MAC=00:15:6D:E8:F9:B8
     98NS_IP=172.16.5.2/29
    9999UE1
    100100
  • nodes/CNodeLCPL/wleiden.conf

    r10048 r10053  
    1212$Y='462483';
    1313
    14 $LOKATIE='Roseveltstraat 4c, Leiden';
    1514
    1615$config{'sis0'}=sprintf <<ED0;
  • nodes/CNodeLangeVoort/wleiden.conf

    r10047 r10053  
    4141CHANNEL=3
    4242DHCP=no
    43 BulletIP=172.16.6.27
    44 BulletMAC=00:15:6D:D5:F8:36
     43NS_IP=172.16.6.27
     44NS_MAC=00:15:6D:D5:F8:36
    4545VR1
    4646
     
    5454ESSID=il-o.lijtweg1.wleiden.net
    5555DHCP=no
    56 BulletIP=172.16.6.3
    57 BulletMAC=00:15:6D:E9:F9:BD
     56NS_IP=172.16.6.3
     57NS_MAC=00:15:6D:E9:F9:BD
    5858VR2
    5959
  • nodes/CNodeLijtweg1/wleiden.conf

    r10047 r10053  
    3333ESSID=il-o.lijtweg1.wleiden.net
    3434CHANNEL=2
    35 BulletIP=172.16.6.2
    36 BulletMAC=00:15:6D:E9:E7:20
     35NS_IP=172.16.6.2
     36NS_MAC=00:15:6D:E9:E7:20
    3737UE0
    3838
  • nodes/CNodeLorentzhof/wleiden.conf

    r10048 r10053  
    1212$Y='463030';
    1313
    14 $LOKATIE='Lorentzhof 1, 2313 GA,  Leiden';
    1514
    1615$config{'sis0'}=sprintf <<ED0;
  • nodes/CNodeMeerburg/wleiden.conf

    r10047 r10053  
    88$Y='461984';
    99$status='down';
     10
     11$COMMENT=sprintf <<EOF;
     12ue0: Twee accesspoints
     13CHANNEL=3
     14NS_MAC=00:27:22:16:77:77
     15NS_IP=172.17.27.2/24
     16CHANNEL=8
     17NS_MAC=00:15:6D:30:D2:B6
     18NS_IP=172.17.27.3/24
     19EOF
    1020
    1121$config{'ath0'}=sprintf <<ATH0;
     
    8191MODE=ap bridge
    8292ESSID=ap-WirelessLeiden-Meerburg
    83 CHANNEL=3
    84 NS2_MAC=00:27:22:16:77:77
    85 NS2_IP=172.17.27.2/24
    86 CHANNEL=8
    87 NS2_MAC=00:15:6D:30:D2:B6
    88 NS2_IP=172.17.27.3/24
    8993UE0
    9094
  • nodes/CNodeMuiderkring/wleiden.conf

    r10047 r10053  
    4444CHANNEL=8
    4545DHCP=no
    46 Bullet2_MAC=00:15:6D:E8:E6:B1
    47 Bullet2_IP=172.16.6.51/29
     46NS_MAC=00:15:6D:E8:E6:B1
     47NS_IP=172.16.6.51/29
    4848VR1
  • nodes/CNodeRV/wleiden.conf

    r10047 r10053  
    7575CHANNEL=4
    7676DHCP=no
    77 BulletMAC=00:15:6D:E9:F9:B0
    78 BulletIP=172.16.4.66/29
     77NS_MAC=00:15:6D:E9:F9:B0
     78NS_IP=172.16.4.66/29
    7979UE0
    8080
  • nodes/CNodeRabo1/wleiden.conf

    r10047 r10053  
    3737STATUS=up
    3838EXTRA_TYPE=eth2wifibridge
    39 SUBTYPE=802.11a
    4039IP=172.16.4.9/29
    4140DESC=Link naar Huub
     
    7776ESSID=il-w.rabo1.wleiden.net
    7877CHANNEL=5
    79 Bullet_IP=172.16.3.130/29
    80 BulletMAC=00:15:6D:E8:F9:5E
     78NS_IP=172.16.3.130/29
     79NS_MAC=00:15:6D:E8:F9:5E
    8180UE0
    8281
     
    9392ESSID=il-n.rabo1.wleiden.net
    9493CHANNEL=13
    95 Bullet_IP=172.16.5.210/29
    96 BulletMAC=00:15:6D:D4:F8:3E
     94NS_IP=172.16.5.210/29
     95NS_MAC=00:15:6D:D4:F8:3E
    9796UE1
  • nodes/CNodeRabo2/wleiden.conf

    r10047 r10053  
    3737STATUS=up
    3838EXTRA_TYPE=eth2wifibridge
    39 SUBTYPE=802.11a
    4039IP=172.16.3.193/29
    4140DESC=Link naar Cope
  • nodes/CNodeRegenboog/wleiden.conf

    r10047 r10053  
    4343ESSID=il-o.rosmolen.wleiden.net
    4444CHANNEL=11
    45 BulletMAC=
     45NS_MAC=
    4646SIS1
    4747
  • nodes/CNodeRosmolen/wleiden.conf

    r10047 r10053  
    6767ESSID=il-o.rosmolen.wleiden.net
    6868CHANNEL=11
    69 Bullet_MAC= 00:15:6D:E8:F9:3D
    70 Bullet_IP=172.16.5.202/29
     69NS_MAC= 00:15:6D:E8:F9:3D
     70NS_IP=172.16.5.202/29
    7171VR2
    7272
     
    9494ESSID=il-nw.rosmolen.wleiden.net
    9595CHANNEL=3
    96 BulletMAC=00:15:6D:
    97 Bullet_IP=172.16.3.74/29
     96NS_MAC=00:15:6D:
     97NS_IP=172.16.3.74/29
    9898UE1
    9999
  • nodes/CNodeSOM2/wleiden.conf

    r10047 r10053  
    9797ESSID=ap-WirelessLeiden-SOM3
    9898CHANNEL=6
    99 Bullet2_MAC= 00:15:6D:E8:F9:B6
    100 Bullet2_IP=172.17.2.66/26
     99NS_MAC= 00:15:6D:E8:F9:B6
     100NS_IP=172.17.2.66/26
    101101UE0
    102102
  • nodes/CNodeStadhuis/wleiden.conf

    r10047 r10053  
    2323ESSID=ap-WirelessLeiden-atrium
    2424NS_IP=172.17.141.2/26
    25 NS2loco_MAC=00:15:6D:FC:4D:C0
     25NS_MAC=00:15:6D:FC:4D:C0
    2626UE0
    2727
  • nodes/CNodeUniGor2/wleiden.conf

    r10047 r10053  
    3939SDESC=2cam
    4040DHCP=no
    41 Bullet2_IP=172.16.16.130/29
    42 Bullet2_MAC= 00:15:6D:E8:E6:9B
     41NS_IP=172.16.16.130/29
     42NS_MAC= 00:15:6D:E8:E6:9B
    4343MODE=bridge master
    4444ESSID=n-o.unigor.wleiden.net
  • nodes/CNodeVosko1/wleiden.conf

    r10047 r10053  
    6969DESC=Ethernet naar Pieterskerk
    7070SDESC=2kerk
    71 NS2_LOCO_IP=172.17.26.2
     71NS_IP=172.17.26.2
    7272DHCP=10-250
    7373VR2
  • nodes/CNodeVosko3/wleiden.conf

    r10047 r10053  
    104104STATUS=up
    105105DHCP=no
    106 USB-LAN-adapterMAC=00:00:e8:00:11:36
    107106UE0
  • nodes/CNodeWBRotary/wleiden.conf

    r10047 r10053  
    3333ESSID=il-w.wbrotary.wleiden.net
    3434CHANNEL=36
    35 BulletM5_MAC=00:27:22:10:34:C6
    36 BulletM5_IP=172.16.18.42/29
     35NS_MAC=00:27:22:10:34:C6
     36NS_IP=172.16.18.42/29
    3737VR0
    3838
     
    6363MODE=master
    6464ESSID=ap-Woubrugge-RotaryWO
    65 BULLET2_IP=172.25.56.2
    66 BULLET2_MAC=00:15:6D:30:2A:5D
     65NS_IP=172.25.56.2
     66NS_MAC=00:15:6D:30:2A:5D
    6767CHANNEL=3
    6868VR2
  • nodes/CNodeZwaluwak/wleiden.conf

    r10047 r10053  
    4343SDESC=2unused
    4444DHCP=no
    45 Bullet2_IP=172.16.6.74/29
    46 Bullet2_MAC=00:15:6D:E8:E7:4A
     45NS_IP=172.16.6.74/29
     46NS_MAC=00:15:6D:E8:E7:4A
    4747MODE=managed
    4848ESSID=effeniks
     
    5858DESC=Link naar BCsSte
    5959SDESC=2bcste
    60 Bullet_IP=172.16.3.252/29
    61 BulletMAC=00:15:6D:E8:E6:A3
     60NS_IP=172.16.3.252/29
     61NS_MAC=00:15:6D:E8:E6:A3
    6262MODE=managed
    6363ESSID=il-nw.bcste.wleiden.net
     
    6969STATUS=up
    7070EXTRA_TYPE=eth2wifibridge
    71 SUBTYPE=802.11a
    7271IP=172.16.3.70/30
    7372DESC=A Link naar Unigor
    7473SDESC=2unigor
    7574DHCP=no
    76 AIRLIVE_IP=192.168.1.21
     75NS_IP=192.168.1.21
    7776MODE=managed
    7877ESSID=ilA-z.unigor.wleiden.net
  • nodes/proxy1/wleiden.conf

    r10047 r10053  
    1515$nat='no';
    1616
    17 $firewall_block=<<EOT;
    18 74.125.79.99/32
    19 83.162.36.0/24
    20 EOT
     17$firewall_block='74.125.79.99/32 83.162.36.0/24';
    2118
    2219$config{'sis0'}=sprintf <<SIS0;
  • nodes/proxy11/wleiden.conf

    r10047 r10053  
    1818TYPE=ethernet
    1919IP=$master_ip/30
    20 ROUTE=172.16.0.0/12 172.23.25.65
    2120
    2221DESC=Link naar Node LangeVoort
     
    2928TYPE=ethernet                                                                             
    3029IP=192.168.1.70/24
    31 ROUTE=0.0.0.0/0 192.168.1.69
    3230
    3331DESC=adsl langevoort
  • tools/genesis-to-yaml.pl

    r10050 r10053  
    8080} else {
    8181  print "ileiden   : no\n";
     82}
     83
     84foreach $key  ('internalif', 'nat', 'internalroute', 'remote_access', 'gateway', 'firewall_block') {
     85  if ($$key) {
     86    print "$key: $$key\n";
     87  }
    8288}
    8389
  • tools/gformat.py

    r10052 r10053  
    277277    output += "tproxy_enable='NO'\n"
    278278
     279  # Extra Proxy configuration
     280  if datadump['nodetype'] == 'Proxy':
     281    output += '\n# Disable routing\ngateway_enable="no"\n'
     282
     283  output += '\ninternalif="%s"\n' % datadump['internalif']
     284
    279285  output += '\n'
    280286  # lo0 configuration:
     
    366372  datadump = yaml.load(f,Loader=Loader)
    367373  datadump['autogen_iface_keys'] = get_interface_keys(datadump)
     374  datadump['autogen_item'] = item
    368375  f.close()
    369376
     
    372379def store_yaml(datadump):
    373380  """ Store configuration yaml for 'item'"""
     381  item = datadump['autogen_item']
    374382  gfile = os.path.join(NODE_DIR,item,'wleiden.yaml')
    375383
    376384  f = open(gfile, 'w')
    377   del datadump['autogen_iface_keys']
    378385  f.write(generate_wleiden_yaml(datadump))
    379386  f.close()
     
    412419
    413420
    414 def write_yaml(item, datadump):
    415   """ Write configuration yaml for 'item'"""
    416   gfile = os.path.join(NODE_DIR,item,'wleiden.yaml')
    417 
    418   f = open(gfile, 'w')
    419   f.write(format_wleiden_yaml(datadump))
    420   f.close()
    421 
    422 
    423 
    424421def generate_resolv_conf(datadump):
    425422  """ Generate configuration file '/etc/resolv.conf' """
     
    429426# Try local (cache) first
    430427nameserver 127.0.0.1
    431 
     428"""
     429  if datadump['nodetype'] == 'Proxy':
     430    output += """\
     431nameserver 8.8.8.8   # Google Public NameServer
     432nameserver 8.8.4.4   # Google Public NameServer
     433"""
     434  else:
     435    output += """\
    432436# Proxies are recursive nameservers
    433437# needs to be in resolv.conf for dnsmasq as well
    434438""" % datadump
    435 
    436   for proxy in get_proxylist():
    437     proxy_ip = get_yaml(proxy)['masterip']
    438     output += "nameserver %-15s # %s\n" % (proxy_ip, proxy)
     439    for proxy in get_proxylist():
     440      proxy_ip = get_yaml(proxy)['masterip']
     441      output += "nameserver %-15s # %s\n" % (proxy_ip, proxy)
     442
    439443  return output
    440444
     
    478482def generate_wleiden_yaml(datadump):
    479483  """ Generate (petty) version of wleiden.yaml"""
     484  for key in datadump.keys():
     485    if key.startswith('autogen_'):
     486      del datadump[key]
     487
    480488  output = generate_header("#")
    481489  output += format_wleiden_yaml(datadump)
     
    843851        datadumps[get_fqdn(datadump)] = datadump
    844852
     853      for key,datadump in datadumps.iteritems():
    845854        datadump['latitude'], datadump['longitude'] = rdnap.rd2etrs(datadump['rdnap_x'], datadump['rdnap_y'])
    846         write_yaml(host, datadump)
     855        store_yaml(datadump)
    847856    elif sys.argv[1] == "list":
    848857      if sys.argv[2] == "nodes":
Note: See TracChangeset for help on using the changeset viewer.