From 3591768b320317dfe6999dcfa6009c00b6ccbbfd Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Mon, 27 Aug 2012 16:01:56 +0200 Subject: [PATCH] =?UTF-8?q?[generate.py]=20fx=20->=20daath=20(cr=C3=A9atio?= =?UTF-8?q?n=20home+mail=5Fbienvenue)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ignore-this: e6de9e7106f3779e467889196590a40b darcs-hash:20120827140156-28565-53e596260b3c8af9891cee12b5669cadab7919f1.gz --- gestion/gen_confs/adherents.py | 11 ++++++----- gestion/gen_confs/autostatus.py | 2 +- gestion/gen_confs/generate.py | 19 ++----------------- 3 files changed, 9 insertions(+), 23 deletions(-) diff --git a/gestion/gen_confs/adherents.py b/gestion/gen_confs/adherents.py index c4ddd225..bdb53706 100644 --- a/gestion/gen_confs/adherents.py +++ b/gestion/gen_confs/adherents.py @@ -45,7 +45,7 @@ class del_user: import traceback traceback.print_exc() - def delete_fx(self): + def delete_daath(self): cprint(u'Archivage fichiers utilisateur', 'gras') for args in self.args: anim('\t' + args) @@ -53,7 +53,7 @@ class del_user: login, home = args.split(',') if not login or not home: raise ValueError('Argument invalide') - if home.startswith('/home/') and hostname == "fx": + if home.startswith('/home/') and hostname == "daath": home = "/home-adh/" + home[6:] warn = '' f = '%s/files/%s_%s.tar.bz2' % ('/home-adh/cimetiere', @@ -84,8 +84,8 @@ class del_user: traceback.print_exc() def reconfigure(self): - if hostname == "fx": - self.delete_fx() + if hostname == "daath": + self.delete_daath() elif hostname == "owl": self.delete_directory(u"Suppression des fichiers index de dovecot", "/var/dovecot-indexes/%s") @@ -109,7 +109,8 @@ class home: except ValueError: home, uid, login = args.split(',') mail_redirect = None - if home.startswith('/home/') and hostname == "fx": + # Kludge pour daath (nfs) normalement inutile + if home.startswith('/home/') and hostname == "daath": home = "/home-adh/" + home[6:] ### Home if not os.path.exists(home): diff --git a/gestion/gen_confs/autostatus.py b/gestion/gen_confs/autostatus.py index 9fac22a1..757fb4eb 100644 --- a/gestion/gen_confs/autostatus.py +++ b/gestion/gen_confs/autostatus.py @@ -69,7 +69,7 @@ class autostatus(gen_config) : "rouge.crans.org", # RIP --> domU redisdead "slon.adm.crans.org", # --> cf nols "ragnarok.crans.org", # RIP contrôleur disque... - "fx.crans.org", # s'appelle désormais zamok + "zamok.crans.org", # c'est en fait fx # Bornes wifi de test "bullet5.wifi.crans.org", diff --git a/gestion/gen_confs/generate.py b/gestion/gen_confs/generate.py index e07b69c7..040f992f 100644 --- a/gestion/gen_confs/generate.py +++ b/gestion/gen_confs/generate.py @@ -48,7 +48,7 @@ class base_reconfigure: 'blacklist_autodisc_upload': [ 'sable-blacklist_autodisc_upload', 'komaz-blacklist', 'zamok-blacklist'], 'blacklist_autodisc_p2p': [ 'sable-blacklist_autodisc_p2p', 'komaz-blacklist', 'zamok-blacklist'], 'blacklist_bloq': [ 'komaz-blacklist', 'sable-blacklist_bloq', 'zamok-blacklist', 'dns' ], - 'del_user': [ 'fx-del_user', 'owl-del_user', 'zamok-del_user' ] + 'del_user': [ 'daath-del_user', 'owl-del_user', 'zamok-del_user' ] } def __init__(self, to_do=None): @@ -191,7 +191,7 @@ class zamok(base_reconfigure): from firewall import firewall_zamok firewall_zamok().blacklist() -class fx(base_reconfigure): +class daath(base_reconfigure): def home(self, args): from adherents import home self._do(home(args)) @@ -344,21 +344,6 @@ class gordon(base_reconfigure) : from gen_confs.dhcpd_new import dhcp self._do(dhcp(), self._machines()) - - -class vert(base_reconfigure): - def home(self, args): - from adherents import home - self._do(home(args)) - - def del_user(self, args): - from adherents import del_user - self._do(del_user(args)) - - def mail_bienvenue(self, mails): - from adherents import mail_bienvenue - self._do(mail_bienvenue(mails)) - class titanic(base_reconfigure): def dhcp(self): from gen_confs.dhcpd_new import dhcp