[generate.py] fx -> daath (création home+mail_bienvenue)

Ignore-this: e6de9e7106f3779e467889196590a40b

darcs-hash:20120827140156-28565-53e596260b3c8af9891cee12b5669cadab7919f1.gz
This commit is contained in:
Daniel STAN 2012-08-27 16:01:56 +02:00
parent 84d7e65368
commit 3591768b32
3 changed files with 9 additions and 23 deletions

View file

@ -45,7 +45,7 @@ class del_user:
import traceback import traceback
traceback.print_exc() traceback.print_exc()
def delete_fx(self): def delete_daath(self):
cprint(u'Archivage fichiers utilisateur', 'gras') cprint(u'Archivage fichiers utilisateur', 'gras')
for args in self.args: for args in self.args:
anim('\t' + args) anim('\t' + args)
@ -53,7 +53,7 @@ class del_user:
login, home = args.split(',') login, home = args.split(',')
if not login or not home: if not login or not home:
raise ValueError('Argument invalide') raise ValueError('Argument invalide')
if home.startswith('/home/') and hostname == "fx": if home.startswith('/home/') and hostname == "daath":
home = "/home-adh/" + home[6:] home = "/home-adh/" + home[6:]
warn = '' warn = ''
f = '%s/files/%s_%s.tar.bz2' % ('/home-adh/cimetiere', f = '%s/files/%s_%s.tar.bz2' % ('/home-adh/cimetiere',
@ -84,8 +84,8 @@ class del_user:
traceback.print_exc() traceback.print_exc()
def reconfigure(self): def reconfigure(self):
if hostname == "fx": if hostname == "daath":
self.delete_fx() self.delete_daath()
elif hostname == "owl": elif hostname == "owl":
self.delete_directory(u"Suppression des fichiers index de dovecot", self.delete_directory(u"Suppression des fichiers index de dovecot",
"/var/dovecot-indexes/%s") "/var/dovecot-indexes/%s")
@ -109,7 +109,8 @@ class home:
except ValueError: except ValueError:
home, uid, login = args.split(',') home, uid, login = args.split(',')
mail_redirect = None 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 = "/home-adh/" + home[6:]
### Home ### Home
if not os.path.exists(home): if not os.path.exists(home):

View file

@ -69,7 +69,7 @@ class autostatus(gen_config) :
"rouge.crans.org", # RIP --> domU redisdead "rouge.crans.org", # RIP --> domU redisdead
"slon.adm.crans.org", # --> cf nols "slon.adm.crans.org", # --> cf nols
"ragnarok.crans.org", # RIP contrôleur disque... "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 # Bornes wifi de test
"bullet5.wifi.crans.org", "bullet5.wifi.crans.org",

View file

@ -48,7 +48,7 @@ class base_reconfigure:
'blacklist_autodisc_upload': [ 'sable-blacklist_autodisc_upload', 'komaz-blacklist', 'zamok-blacklist'], 'blacklist_autodisc_upload': [ 'sable-blacklist_autodisc_upload', 'komaz-blacklist', 'zamok-blacklist'],
'blacklist_autodisc_p2p': [ 'sable-blacklist_autodisc_p2p', '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' ], '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): def __init__(self, to_do=None):
@ -191,7 +191,7 @@ class zamok(base_reconfigure):
from firewall import firewall_zamok from firewall import firewall_zamok
firewall_zamok().blacklist() firewall_zamok().blacklist()
class fx(base_reconfigure): class daath(base_reconfigure):
def home(self, args): def home(self, args):
from adherents import home from adherents import home
self._do(home(args)) self._do(home(args))
@ -344,21 +344,6 @@ class gordon(base_reconfigure) :
from gen_confs.dhcpd_new import dhcp from gen_confs.dhcpd_new import dhcp
self._do(dhcp(), self._machines()) 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): class titanic(base_reconfigure):
def dhcp(self): def dhcp(self):
from gen_confs.dhcpd_new import dhcp from gen_confs.dhcpd_new import dhcp