[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:
Michel Blockelet 2009-12-02 03:04:45 +01:00
parent 57e3517e5e
commit 0ae1a92a41
2 changed files with 6 additions and 6 deletions

View file

@ -56,10 +56,10 @@ class del_user:
if home.startswith('/home/') and hostname == "fx": if home.startswith('/home/') and hostname == "fx":
home = "/home-adh/" + home[6:] home = "/home-adh/" + home[6:]
warn = '' 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'), strftime('%Y-%m-%d-%Hh%Mm'),
login) 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): if (status != 512 and status != 0) or not os.path.isfile(f):
# La 512 est si un des paths n'exite pas. # La 512 est si un des paths n'exite pas.
raise OSError(output) raise OSError(output)
@ -67,10 +67,10 @@ class del_user:
shutil.rmtree(home) shutil.rmtree(home)
else: else:
warn += '%s incorrect\n' % home warn += '%s incorrect\n' % home
if os.path.isdir('/var/spool/mail/' + login): if os.path.isdir('/home-adh/mail/' + login):
shutil.rmtree('/var/spool/mail/' + login) shutil.rmtree('/home-adh/mail/' + login)
else: else:
warn += '/var/spool/mail/%s incorrect\n' % login warn += '/home-adh/mail/%s incorrect\n' % login
if warn: if warn:
print WARNING print WARNING
if self.debug: if self.debug:

View file

@ -45,7 +45,7 @@ class base_reconfigure:
'blacklist_autodisc_upload': [ 'sable-blacklist_autodisc_upload', 'komaz-blacklist'], 'blacklist_autodisc_upload': [ 'sable-blacklist_autodisc_upload', 'komaz-blacklist'],
'blacklist_autodisc_p2p': [ 'sable-blacklist_autodisc_p2p', 'komaz-blacklist'], 'blacklist_autodisc_p2p': [ 'sable-blacklist_autodisc_p2p', 'komaz-blacklist'],
'blacklist_bloq': [ 'komaz-blacklist', 'sable-blacklist_bloq' ], 'blacklist_bloq': [ 'komaz-blacklist', 'sable-blacklist_bloq' ],
'del_user': [ 'vert-del_user', 'rouge-del_user', 'zamok-del_user' ] 'del_user': [ 'fx-del_user', 'rouge-del_user', 'zamok-del_user' ]
} }
def __init__(self, to_do=None): def __init__(self, to_do=None):