From 675cfaccfb679738093b8d71496eb130f8fc29d1 Mon Sep 17 00:00:00 2001 From: bernat Date: Mon, 8 Aug 2005 09:13:41 +0200 Subject: [PATCH] On cree les homes et le repertoire de mail darcs-hash:20050808071341-d1718-9629445b3e281b89cf531168e5b3cbb85b24166a.gz --- gestion/gen_confs/adherents.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/gestion/gen_confs/adherents.py b/gestion/gen_confs/adherents.py index 360a16b0..681350b4 100755 --- a/gestion/gen_confs/adherents.py +++ b/gestion/gen_confs/adherents.py @@ -71,15 +71,7 @@ class home: if stat[4] != int(uid) or stat[5] != config.gid : # Le home n'est pas -bà la bonne personne-A raise OSError('home existant') - - ### Mail - try: - os.mkdir(home + '/Mail', 0700) - os.chown(home + '/Mail', int(uid) ,config.gid) - except : - # Pas grave - pass - + ### Quota status, output = commands.getstatusoutput('/usr/sbin/edquota -p pauget %s' % login ) if status : @@ -88,6 +80,13 @@ class home: sys.stderr.write(output+'\n') else : print OK + + ### Mail + os.mkdir(home + '/Mail', 0700) + os.chown(home + '/Mail', int(uid) ,config.gid) + os.mkdir('/var/mail/' + login,0770) + os.chown('/var/mail/' + login, int(uid) ,8) + except : print ERREUR if self.debug :