[dhcp] On ajoute isc à dydhcp, et on passe quelques modifs de Valentin
This commit is contained in:
parent
662061781b
commit
9a5294c7ee
4 changed files with 23 additions and 34 deletions
|
@ -1908,7 +1908,7 @@ class BaseProprietaire(BaseClasseCrans):
|
|||
self.services_to_restart('macip', [m.ip()] )
|
||||
self.services_to_restart('classify', [m.ip()] )
|
||||
self.services_to_restart('dns')
|
||||
self.services_to_restart('dhcp-dhcp')
|
||||
self.services_to_restart('dhcp')
|
||||
|
||||
# Vérification si changement de bât, ce qui obligerai un changement d'IP
|
||||
if 'adherentPayant' in self.modifs or 'chbre' in self.modifs and self.chbre() != '????':
|
||||
|
@ -3193,9 +3193,10 @@ Contactez nounou si la MAC est bien celle d'une carte.""", 3)
|
|||
# Si la configuration ip à changer on met dynamiquement à jour le dhcp
|
||||
if reconf_ip:
|
||||
from gen_confs.dhcpd_new import dydhcp
|
||||
dhcp=dydhcp()
|
||||
dhcp.del_host(self._init_data.get('ipHostNumber',[self.ip()])[0],self._init_data.get('macAddress',[self.mac()])[0])
|
||||
dhcp.add_host(self._data.get('ipHostNumber',[self.ip()])[0],self._data.get('macAddress',[self.mac()])[0],self.nom())
|
||||
for server in config.dhcp_servers:
|
||||
dhcp=dydhcp(server)
|
||||
dhcp.del_host(self._init_data.get('ipHostNumber',[self.ip()])[0],self._init_data.get('macAddress',[self.mac()])[0])
|
||||
dhcp.add_host(self._data.get('ipHostNumber',[self.ip()])[0],self._data.get('macAddress',[self.mac()])[0],self.nom())
|
||||
# Enregistrement
|
||||
self._save()
|
||||
|
||||
|
@ -3212,7 +3213,7 @@ Contactez nounou si la MAC est bien celle d'une carte.""", 3)
|
|||
if reconf_ip:
|
||||
self.services_to_restart('macip', reconf_ip)
|
||||
self.services_to_restart('classify', reconf_ip)
|
||||
self.services_to_restart('dhcp-dhcp')
|
||||
self.services_to_restart('dhcp')
|
||||
if 'portTCPin' in self.modifs or 'portTCPout' in self.modifs or \
|
||||
'portUDPin' in self.modifs or 'portUDPout' in self.modifs:
|
||||
self.services_to_restart('komaz-ports', [self.ip()])
|
||||
|
@ -3274,11 +3275,12 @@ Contactez nounou si la MAC est bien celle d'une carte.""", 3)
|
|||
|
||||
# On supprime la machine du dhcp
|
||||
from gen_confs.dhcpd_new import dydhcp
|
||||
dhcp=dydhcp()
|
||||
dhcp.del_host(self.ip(),self.mac())
|
||||
for server in config.dhcp_servers:
|
||||
dhcp=dydhcp(server)
|
||||
dhcp.del_host(self.ip(),self.mac())
|
||||
|
||||
# Services à redémarrer
|
||||
self.services_to_restart('dhcp-dhcp')
|
||||
self.services_to_restart('dhcp')
|
||||
|
||||
if self.exempt():
|
||||
self.services_to_restart('surveillance_exemptions')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue