diff --git a/gestion/gen_confs/dhcpd_new.py b/gestion/gen_confs/dhcpd_new.py index 60100862..3ae16e55 100644 --- a/gestion/gen_confs/dhcpd_new.py +++ b/gestion/gen_confs/dhcpd_new.py @@ -16,6 +16,7 @@ if '/usr/scripts' not in sys.path: from gestion.iptools import AddrInNet from gestion.gen_confs import gen_config from gestion.config import NETs +from gestion.config.services import services from gestion import secrets_new as secrets # Relative imports @@ -83,8 +84,8 @@ class dhcp(gen_config) : """ ######################################PARTIE DE CONFIGURATION # Fichier à écire - if hostname in ['dhcp', 'isc']: - restart_cmd = '/etc/init.d/isc-dhcp-server restart' + if hostname in services.get('isc-dhcp-server', []): + restart_cmd = '/usr/bin/monit restart isc-dhcp-server' reseaux = { '138.231.136.0/21' : '/etc/dhcp3/generated/adherents.liste', '10.42.0.0/16' : '/etc/dhcp3/generated/gratuit.liste', '10.2.9.0/24' : '/etc/dhcp3/generated/appartements.liste', @@ -102,17 +103,6 @@ class dhcp(gen_config) : } """ - host_template_ltsp_powerpc = """ - host %(nom)s { - hardware ethernet %(mac)s; - fixed-address %(ip)s; - option host-name "%(host)s"; - next-server 138.231.136.98; - filename "yaboot"; - option root-path "/opt/ltsp/powerpc"; - } -""" - ### Verbosité # Si =1 ralera (chaine warnings) si machines hors zone trouvée # Si =0 ralera seulement si réseau vide