Debut de support du DHCP pour nectaris
darcs-hash:20041129080050-d1718-39483e17cea64f34963edd813dd0140d7ab8aa92.gz
This commit is contained in:
parent
e88b881f07
commit
9bd581a0e9
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue