From 39fd0da800708cb06ba0d7187b26ab2ae6845341 Mon Sep 17 00:00:00 2001 From: bernat Date: Wed, 5 Jan 2005 09:53:21 +0100 Subject: [PATCH] zamok sert uniquement le fil, nectaris le wifi ; zamok est dsormais autoritaire. Si nectaris savait ne servir que les relais, il pourrait l'tre aussi. darcs-hash:20050105085321-d1718-28f2da4cc110504f0f3ab319ad08b49461722433.gz --- gestion/gen_confs/dhcpd.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/gestion/gen_confs/dhcpd.py b/gestion/gen_confs/dhcpd.py index 20a2921e..9ef735c3 100755 --- a/gestion/gen_confs/dhcpd.py +++ b/gestion/gen_confs/dhcpd.py @@ -26,23 +26,21 @@ class dhcp(gen_config) : DHCPD_CONF='/etc/dhcpd.conf' # Réseaux servis avec leurs options spécifiques - reseaux = { '138.231.136.0/21' : + if hostname == 'zamok': + reseaux = { '138.231.136.0/21' : """option routers 138.231.136.4; option domain-name-servers 138.231.136.6, 138.231.136.10, 138.231.136.9; option domain-name "crans.org"; - option option-119 "crans.org wifi.crans.org";""", - - '138.231.148.0/22' : + option option-119 "crans.org wifi.crans.org";""" } + elif hostname == 'nectaris': + reseaux = { '138.231.148.0/22' : """option routers 138.231.148.1; + not authoritative; option domain-name-servers 138.231.148.1; option domain-name "wifi.crans.org"; option option-119 "wifi.crans.org crans.org";""" } - # Pour nectaris, on sert juste le wifi - if hostname == 'nectaris': - del reseaux['138.231.136.0/21'] - # Options communes à toutes les réseaux servis base_dhcp=""" subnet %(network)s netmask %(netmask)s { @@ -59,7 +57,6 @@ subnet %(network)s netmask %(netmask)s { option ip-forwarding off; option option-252 "http://www.crans.org/proxy.pac" ; deny unknown-clients; - not authoritative; %(HOSTs)s } """