From a9c7f1b23f1244837422996de7656e50c759c1b4 Mon Sep 17 00:00:00 2001 From: bernat Date: Sun, 5 Sep 2004 23:35:04 +0200 Subject: [PATCH] Encore des conneries darcs-hash:20040905213504-d1718-f80e46f82a6dcaefee398f2188b137995e109ad3.gz --- gestion/gen_confs/dhcpd.py | 2 +- gestion/gen_confs/switchs.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gestion/gen_confs/dhcpd.py b/gestion/gen_confs/dhcpd.py index a7a365b1..3b267288 100755 --- a/gestion/gen_confs/dhcpd.py +++ b/gestion/gen_confs/dhcpd.py @@ -72,7 +72,7 @@ subnet %(network)s netmask %(netmask)s { # Si =0 ralera seulement si réseau vide verbose = 1 - restart_cmd = '/etc/init.d/dhcp stop ; sleep 1 ; /etc/init.d/dhcp start' + restart_cmd = '/etc/init.d/dhcp restart' ######################################FIN PARTIE DE CONFIGURATION diff --git a/gestion/gen_confs/switchs.py b/gestion/gen_confs/switchs.py index 7453010b..64fcc926 100755 --- a/gestion/gen_confs/switchs.py +++ b/gestion/gen_confs/switchs.py @@ -78,8 +78,11 @@ class switch(gen_config) : conn=smtplib.SMTP('localhost') txt_mail = "From: Crans scripts <%(From)s>\n" txt_mail+= "To: %(To)s\n" - txt_mail+= "Subject: Bienvenue au Cr@ns !\n\n" - txt_mail+= "Chambre %s à débrancher." % chbre + txt_mail+= "Subject: (CRANS) Changement d'état d'une chambre !\n\n" + if action == 'disable': + txt_mail+= "Chambre %s à débrancher." % chbre + else: + txt_mail+= "Chambre %s à brancher." % chbre conn.sendmail(From, To , txt_mail % { 'From' : From, 'To' : To }) conn.quit() print OK