From cbaf85575140c20c5d2b7f084d3c0602731e3fb9 Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Thu, 27 Aug 2009 11:06:40 +0200 Subject: [PATCH] [gen_confs/adherents.py] fx @#!@#! Ignore-this: 4591b000a77f95d4ebc77dc8decfcdf6 darcs-hash:20090827090640-ffbb2-a0cfb0e253e6ec9b5ba6530d0d658d1feb0db6dc.gz --- gestion/gen_confs/adherents.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gestion/gen_confs/adherents.py b/gestion/gen_confs/adherents.py index 35191c1d..eff34bde 100644 --- a/gestion/gen_confs/adherents.py +++ b/gestion/gen_confs/adherents.py @@ -53,6 +53,8 @@ class del_user: login, home = args.split(',') if not login or not home: raise ValueError('Argument invalide') + if home.startswith('/home/') and hostname == "fx": + home = "/home-adh/" + home[6:] warn = '' f = '%s/files/%s_%s.tar.bz2' % (config.cimetiere, strftime('%Y-%m-%d-%Hh%Mm'), @@ -103,6 +105,8 @@ class home: anim('\t' + args) try: home, uid, login = args.split(',') + if home.startswith('/home/') and hostname == "fx": + home = "/home-adh/" + home[6:] ### Home if not os.path.exists(home): # Le home n'existe pas @@ -128,8 +132,8 @@ class home: ### Mail os.mkdir(home + '/Mail', 0700) os.chown(home + '/Mail', int(uid), config.gid) - os.mkdir('/home/mail/' + login, 0770) - os.chown('/home/mail/' + login, int(uid), 8) + os.mkdir('/home-adh/mail/' + login, 0770) + os.chown('/home-adh/mail/' + login, int(uid), 8) except: print ERREUR