[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
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):