diff --git a/gestion/gen_confs/dhcpd.py b/gestion/gen_confs/dhcpd.py index 64e54891..d0e49501 100755 --- a/gestion/gen_confs/dhcpd.py +++ b/gestion/gen_confs/dhcpd.py @@ -9,6 +9,7 @@ Licence : GPLv2 from iptools import AddrInNet, param from gen_confs import gen_config +from ldap_crans import hostname class dhcp(gen_config) : """ Génération du fichier de configuration pour dhcpd (DHCPD_CONF) @@ -37,7 +38,11 @@ class dhcp(gen_config) : 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 { @@ -95,7 +100,7 @@ subnet %(network)s netmask %(netmask)s { try : hosts[net] += self.host_template % d except : hosts[net] = self.host_template % d t = 1 - if not t and self.verbose : + if not hostname == "nectaris" and not t and self.verbose : warnings += u'Machine ignorée (mid=%s) : ip en dehors des réseaux servis (%s)\n' % ( machine.id(), machine.ip() ) ### Ecriture du fichier