Convert site config to Lua, move variable parts (release number) to site.mk

This commit is contained in:
Matthias Schiffer 2014-05-13 16:43:42 +02:00
parent 4f1edbbdf1
commit 43ec5c7a6d
2 changed files with 102 additions and 98 deletions

194
site.conf
View file

@ -1,128 +1,126 @@
{ {
hostname_prefix => 'freifunk', hostname_prefix = 'freifunk',
site_name => 'Freifunk Lübeck', site_name = 'Freifunk Lübeck',
site_code => 'ffhl', site_code = 'ffhl',
release => '0.4+0-exp' . nightly,
prefix4 => '10.130.0.0/20', prefix4 = '10.130.0.0/20',
prefix6 => 'fdef:ffc0:3dd7::/64', prefix6 = 'fdef:ffc0:3dd7::/64',
timezone => 'CET-1CEST,M3.5.0,M10.5.0/3', # Europe/Berlin timezone = 'CET-1CEST,M3.5.0,M10.5.0/3', -- Europe/Berlin
ntp_servers => ['1.ntp.services.ffhl'], ntp_servers = {'1.ntp.services.ffhl'},
regdom => 'DE', regdom = 'DE',
wifi24 => { wifi24 = {
ssid => 'luebeck.freifunk.net', ssid = 'luebeck.freifunk.net',
channel => 1, channel = 1,
htmode => 'HT40+', htmode = 'HT40+',
mesh_ssid => '02:d1:11:37:fc:38', mesh_ssid = '02:d1:11:37:fc:38',
mesh_bssid => '02:d1:11:37:fc:38', mesh_bssid = '02:d1:11:37:fc:38',
mesh_mcast_rate => 12000, mesh_mcast_rate = 12000,
}, },
wifi5 => { wifi5 = {
ssid => 'luebeck.freifunk.net (5GHz)', ssid = 'luebeck.freifunk.net (5GHz)',
channel => 44, channel = 44,
htmode => 'HT40+', htmode = 'HT40+',
mesh_ssid => '02:d1:11:37:fc:38', mesh_ssid = '02:d1:11:37:fc:38',
mesh_bssid => '02:d1:11:37:fc:38', mesh_bssid = '02:d1:11:37:fc:38',
mesh_mcast_rate => 12000, mesh_mcast_rate = 12000,
}, },
next_node => { next_node = {
ip4 => '10.130.0.1', ip4 = '10.130.0.1',
ip6 => 'fdef:ffc0:3dd7::1', ip6 = 'fdef:ffc0:3dd7::1',
mac => '16:41:95:40:f7:dc', mac = '16:41:95:40:f7:dc',
}, },
fastd_mesh_vpn => { fastd_mesh_vpn = {
methods => ['salsa2012+gmac'], methods = {'salsa2012+gmac'},
mtu => 1426, mtu = 1426,
backbone => { backbone = {
limit => 2, limit = 2,
peers => { peers = {
burgtor => { burgtor = {
key => '657af03e36ff1b8bbe5a5134982a4f110c8523a9a63293870caf548916a95a03', key = '657af03e36ff1b8bbe5a5134982a4f110c8523a9a63293870caf548916a95a03',
remotes => ['ipv4 "burgtor.mesh.ffhl.chaotikum.org" port 10000'], remotes = {'ipv4 "burgtor.mesh.ffhl.chaotikum.org" port 10000'},
}, },
holstentor => { holstentor = {
key => '8c660f7511bf101ea1b599fe53af20e1146cd923c9e9d2a3a0d534ee75af9067', key = '8c660f7511bf101ea1b599fe53af20e1146cd923c9e9d2a3a0d534ee75af9067',
remotes => ['ipv4 "holstentor.mesh.ffhl.chaotikum.org" port 10000'], remotes = {'ipv4 "holstentor.mesh.ffhl.chaotikum.org" port 10000'},
}, },
huextertor => { huextertor = {
key => 'a1b124f43eae4f5929850c09cda825ef35d659e3db4d7746e3d97627e9fa7238', key = 'a1b124f43eae4f5929850c09cda825ef35d659e3db4d7746e3d97627e9fa7238',
remotes => ['ipv4 "huextertor.mesh.ffhl.chaotikum.org" port 10000'], remotes = {'ipv4 "huextertor.mesh.ffhl.chaotikum.org" port 10000'},
}, },
muehlentor => { muehlentor = {
key => 'bd4ec3cf87bb0042eed2fa121fbc402154d28fb1ae9dff9cdb71bb21892f401a', key = 'bd4ec3cf87bb0042eed2fa121fbc402154d28fb1ae9dff9cdb71bb21892f401a',
remotes => ['ipv4 "muehlentor.mesh.ffhl.chaotikum.org" port 10000'], remotes = {'ipv4 "muehlentor.mesh.ffhl.chaotikum.org" port 10000'},
}, },
}, },
}, },
}, },
autoupdater => { autoupdater = {
enabled => 1, branch = 'experimental',
branch => 'experimental', branches = {
branches => { stable = {
stable => { name = 'stable',
name => 'stable', mirrors = {'http://1.updates.services.ffhl/stable/sysupgrade'},
mirrors => ['http://1.updates.services.ffhl/stable/sysupgrade'], probability = 0.08,
probability => 0.08, good_signatures = 2,
good_signatures => 2, pubkeys = {
pubkeys => [ 'daa19b44bbd7033965e02088127bad9516ba0fea8f34267a777144a23ec8900c', -- Linus
'daa19b44bbd7033965e02088127bad9516ba0fea8f34267a777144a23ec8900c', # Linus 'a8dd60765b07330a4bbfdf8406102befca132881a4b65f3efda32cf2d5b362d9', -- Nils
'a8dd60765b07330a4bbfdf8406102befca132881a4b65f3efda32cf2d5b362d9', # Nils '323bd3285c4e5547a89cd6da1f2aef67f1654b0928bbd5b104efc9dab2156d0b', -- NeoRaider
'323bd3285c4e5547a89cd6da1f2aef67f1654b0928bbd5b104efc9dab2156d0b', # NeoRaider
],
}, },
beta => {
name => 'beta',
mirrors => ['http://1.updates.services.ffhl/beta/sysupgrade'],
probability => 0.08,
good_signatures => 2,
pubkeys => [
'daa19b44bbd7033965e02088127bad9516ba0fea8f34267a777144a23ec8900c', # Linus
'a8dd60765b07330a4bbfdf8406102befca132881a4b65f3efda32cf2d5b362d9', # Nils
'323bd3285c4e5547a89cd6da1f2aef67f1654b0928bbd5b104efc9dab2156d0b', # NeoRaider
],
}, },
experimental => { beta = {
name => 'experimental', name = 'beta',
mirrors => ['http://1.updates.services.ffhl/experimental/sysupgrade'], mirrors = {'http://1.updates.services.ffhl/beta/sysupgrade'},
probability => 1.00, probability = 0.08,
good_signatures => 1, good_signatures = 2,
pubkeys => [ pubkeys = {
'496136b37e5f561dfdf523611f14e4b6bc2a745cbc1ab7daffa59fded5f202d1', # philae 'daa19b44bbd7033965e02088127bad9516ba0fea8f34267a777144a23ec8900c', -- Linus
], 'a8dd60765b07330a4bbfdf8406102befca132881a4b65f3efda32cf2d5b362d9', -- Nils
'323bd3285c4e5547a89cd6da1f2aef67f1654b0928bbd5b104efc9dab2156d0b', -- NeoRaider
},
},
experimental = {
name = 'experimental',
mirrors = {'http://1.updates.services.ffhl/experimental/sysupgrade'},
probability = 1.00,
good_signatures = 1,
pubkeys = {
'496136b37e5f561dfdf523611f14e4b6bc2a745cbc1ab7daffa59fded5f202d1', -- philae
},
}, },
}, },
}, },
simple_tc => { simple_tc = {
mesh_vpn => { mesh_vpn = {
ifname => 'mesh-vpn', ifname = 'mesh-vpn',
enabled => 0, enabled = 0,
limit_egress => 200, limit_egress = 200,
limit_ingress => 3000, limit_ingress = 3000,
}, },
}, },
config_mode => { config_mode = {
msg_welcome => <<'END', msg_welcome = [[
Willkommen zum Einrichtungsassistenten für deinen neuen Lübecker Willkommen zum Einrichtungsassistenten für deinen neuen Lübecker
Freifunk-Knoten. Fülle das folgende Formular deinen Vorstellungen Freifunk-Knoten. Fülle das folgende Formular deinen Vorstellungen
entsprechend aus und sende es ab. entsprechend aus und sende es ab.
END ]],
msg_pubkey => <<'END', msg_pubkey = [[
Dies ist der öffentliche Schlüssel deines Freifunkknotens. Erst nachdem Dies ist der öffentliche Schlüssel deines Freifunkknotens. Erst nachdem
er auf den Servern des Lübecker Freifunk-Projektes eingetragen wurde, er auf den Servern des Lübecker Freifunk-Projektes eingetragen wurde,
kann sich dein Knoten mit dem Lübecker Mesh-VPN zu verbinden. Bitte kann sich dein Knoten mit dem Lübecker Mesh-VPN zu verbinden. Bitte
schicke dazu diesen Schlüssel und den Namen deines Knotens schicke dazu diesen Schlüssel und den Namen deines Knotens
(<em><%=hostname%></em>) an (<em><%=hostname%></em>) an
<a href="mailto:keys@luebeck.freifunk.net">keys@luebeck.freifunk.net</a>. <a href="mailto:keys@luebeck.freifunk.net">keys@luebeck.freifunk.net</a>.
END ]],
msg_reboot => <<'END', msg_reboot = [[
<p> <p>
Dein Knoten startet gerade neu und wird anschließend versuchen, Dein Knoten startet gerade neu und wird anschließend versuchen,
sich anschließend mit anderen Freifunkknoten in seiner Nähe zu sich anschließend mit anderen Freifunkknoten in seiner Nähe zu
@ -133,17 +131,17 @@ Lübecker Freifunk-Community findest du auf
<p> <p>
Viel Spaß mit deinem Knoten und der Erkundung von Freifunk! Viel Spaß mit deinem Knoten und der Erkundung von Freifunk!
</p> </p>
END ]],
}, },
legacy => { legacy = {
version_files => ['/etc/.freifunk_version_keep', '/etc/.lff_version_keep'], version_files = {'/etc/.freifunk_version_keep', '/etc/.lff_version_keep'},
old_files => ['/etc/config/config_mode', '/etc/config/ffhl', '/etc/config/freifunk'], old_files = {'/etc/config/config_mode', '/etc/config/ffhl', '/etc/config/freifunk'},
config_mode_configs => ['config_mode.@wizard[0]', 'ffhl.@wizard[0]', 'freifunk.@wizard[0]'], config_mode_configs = {'config_mode', 'ffhl', 'freifunk'},
fastd_configs => ['ffhl_mesh_vpn', 'mesh_vpn'], fastd_configs = {'ffhl_mesh_vpn', 'mesh_vpn'},
mesh_ifname => 'freifunk', mesh_ifname = 'freifunk',
tc_configs => ['ffhl.@bandwidth[0]', 'freifunk.@bandwidth[0]'], tc_configs = {'ffhl', 'freifunk'},
wifi_names => ['wifi_freifunk', 'wifi_freifunk5', 'wifi_mesh', 'wifi_mesh5'], wifi_names = {'wifi_freifunk', 'wifi_freifunk5', 'wifi_mesh', 'wifi_mesh5'},
}, },
} }

View file

@ -15,3 +15,9 @@ GLUON_SITE_PACKAGES := \
iwinfo \ iwinfo \
iptables \ iptables \
haveged haveged
DEFAULT_GLUON_RELEASE := 0.4+0-exp$(shell date '+%Y%m%d')
# Allow overriding the release number from the command line
GLUON_RELEASE ?= $(DEFAULT_GLUON_RELEASE)