Changeset 10112 in genesis for tools


Ignore:
Timestamp:
Mar 11, 2012, 2:21:20 PM (13 years ago)
Author:
rick
Message:

Included iLeiden proxy configuration into default proxy settings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r10110 r10112  
    270270def generate_rc_conf_local(datadump):
    271271  """ Generate configuration file '/etc/rc.conf.local' """
    272   datadump['ileiden_enable'] = 'yes' if datadump['ileiden'] else 'no'
     272  datadump['autogen_ileiden_enable'] = 'yes' if datadump['ileiden'] else 'no'
     273
     274  ileiden_proxies = []
     275  for proxy in get_proxylist():
     276    proxydump = get_yaml(proxy)
     277    if proxydump['ileiden']:
     278      ileiden_proxies.append(proxydump)
     279  datadump['autogen_ileiden_proxies'] = ','.join([x['masterip'] for x in ileiden_proxies])
     280  datadump['autogen_ileiden_proxies_names'] = ','.join([x['autogen_item'] for x in ileiden_proxies])
    273281
    274282  output = generate_header("#");
     
    303311
    304312# PROXY iLeiden Configuration
    305 ileiden_enable="{{ ileiden_enable }}"
    306 gateway_enable="{{ ileiden_enable }}"
    307 firewall_enable="{{ ileiden_enable }}"
     313lvrouted_enable="{{ autogen_ileiden_enable }}"
     314lvrouted_flags="-u -s s00p3rs3kr3t -m 28"
     315ileiden_enable="{{ autogen_ileiden_enable }}"
     316gateway_enable="{{ autogen_ileiden_enable }}"
     317firewall_enable="{{ autogen_ileiden_enable }}"
    308318firewall_script="/etc/ipfw.sh"
    309 firewall_nat_enable="{{ ileiden_enable }}"
     319firewall_nat_enable="{{ autogen_ileiden_enable }}"
    310320{% endif -%}
    311321
    312322{% if nodetype == "CNode" %}
     323#
    313324# NODE iLeiden Configuration
     325#
     326# iLeiden Proxies {{ autogen_ileiden_proxies_names }}
     327lvrouted_flags="-u -s s00p3rs3kr3t -m 28 -z {{ autogen_ileiden_proxies }}"
     328
    314329captive_portal_whitelist=""
    315330captive_portal_interfaces="{{ autogen_dhcp_interfaces }}"
Note: See TracChangeset for help on using the changeset viewer.