[gen_confs/{adherents,generate}.py] Reparation suppression comptes adherents
Bah depuis que c'est sur fx ... En tout cas : les homes supprimes sont archives dans le cimetiere, avis a ceux qui comme moi ne le savaient pas ... darcs-hash:20091202020445-ddb99-4cda8a0bef7fdecea9f1c8e8ecfcb034398f726f.gz
This commit is contained in:
parent
57e3517e5e
commit
0ae1a92a41
2 changed files with 6 additions and 6 deletions
|
@ -56,10 +56,10 @@ class del_user:
|
|||
if home.startswith('/home/') and hostname == "fx":
|
||||
home = "/home-adh/" + home[6:]
|
||||
warn = ''
|
||||
f = '%s/files/%s_%s.tar.bz2' % (config.cimetiere,
|
||||
f = '%s/files/%s_%s.tar.bz2' % ('/home-adh/cimetiere',
|
||||
strftime('%Y-%m-%d-%Hh%Mm'),
|
||||
login)
|
||||
status, output = commands.getstatusoutput("tar cjf '%s' '%s' /var/spool/mail/%s" % (f, home, login))
|
||||
status, output = commands.getstatusoutput("tar cjf '%s' '%s' /home-adh/mail/%s" % (f, home, login))
|
||||
if (status != 512 and status != 0) or not os.path.isfile(f):
|
||||
# La 512 est si un des paths n'exite pas.
|
||||
raise OSError(output)
|
||||
|
@ -67,10 +67,10 @@ class del_user:
|
|||
shutil.rmtree(home)
|
||||
else:
|
||||
warn += '%s incorrect\n' % home
|
||||
if os.path.isdir('/var/spool/mail/' + login):
|
||||
shutil.rmtree('/var/spool/mail/' + login)
|
||||
if os.path.isdir('/home-adh/mail/' + login):
|
||||
shutil.rmtree('/home-adh/mail/' + login)
|
||||
else:
|
||||
warn += '/var/spool/mail/%s incorrect\n' % login
|
||||
warn += '/home-adh/mail/%s incorrect\n' % login
|
||||
if warn:
|
||||
print WARNING
|
||||
if self.debug:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue