[dhcp.py,generate.py] draft pour du dhcp sur sable
la classe dhcp_sable est encore incorrecte, car ldap_crans.all_machines ne renvoie pas les machines de 10.24/16. Il semble que de toute façon, c'est dans dhcp_new.py que ce sera codé darcs-hash:20090702060339-bd074-032ccd0ba85c36e9f799fd2fb370eeb3e8fdaaea.gz
This commit is contained in:
parent
ac80f43a4f
commit
b4acaeed00
2 changed files with 33 additions and 2 deletions
|
@ -50,6 +50,26 @@ option option-119 code 119 = text ;
|
|||
# range dynamic-bootp 10.231.149.1 10.231.149.254;
|
||||
# }
|
||||
#"""
|
||||
|
||||
elif hostname == 'sable':
|
||||
# Options communes à toutes les réseaux servis
|
||||
base_conf="""
|
||||
# VLan accueil
|
||||
subnet 10.51.0.0 netmask 255.255.0.0 {
|
||||
range 10.51.0.10 10.51.255.200;
|
||||
# On n'a besoin que du dns ici (pour le portail captif)
|
||||
option domain-name-servers 10.51.0.1;
|
||||
}
|
||||
|
||||
# VLan isolement
|
||||
subnet 10.52.0.0 netmask 255.255.0.0 {
|
||||
range 10.52.0.10 10.52.255.200;
|
||||
option domain-name-servers 10.52.0.1;
|
||||
option routers 10.52.0.1;
|
||||
}
|
||||
|
||||
"""
|
||||
|
||||
else :
|
||||
base_conf = ''
|
||||
|
||||
|
@ -88,6 +108,13 @@ option option-119 code 119 = text ;
|
|||
option routers 10.2.9.1;
|
||||
option domain-name-servers 10.2.9.1;""" }
|
||||
|
||||
elif hostname == 'sable':
|
||||
# le vlan gratuit
|
||||
reseaux = {'10.42.0.0/16' :
|
||||
"""authoritative;
|
||||
option routers 10.42.0.1;
|
||||
option domain-name-servers 10.42.0.1;""" }
|
||||
|
||||
# Options communes à toutes les réseaux servis
|
||||
base_dhcp="""
|
||||
subnet %(network)s netmask %(netmask)s {
|
||||
|
@ -140,7 +167,7 @@ subnet %(network)s netmask %(netmask)s {
|
|||
# restart_cmd = '/etc/init.d/dhcp restart'
|
||||
if hostname == 'ragnarok':
|
||||
restart_cmd = 'kill $(ps auxwwc | awk \'($11 == "dhcpd") {print $2}\') ; sleep 1 ; dhcpd $(grep -v \'^#\' /etc/dhcpd.interfaces | tr \'\\n\' \' \')'
|
||||
elif hostname in ['rouge', 'titanic'] :
|
||||
elif hostname in ['rouge', 'titanic', 'sable'] :
|
||||
restart_cmd = '/etc/init.d/dhcp3-server restart'
|
||||
else:
|
||||
restart_cmd = 'true'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue