[gen_confs/adherents.py] fx @#!@#!
Ignore-this: 4591b000a77f95d4ebc77dc8decfcdf6 darcs-hash:20090827090640-ffbb2-a0cfb0e253e6ec9b5ba6530d0d658d1feb0db6dc.gz
This commit is contained in:
parent
64729bbe7d
commit
cbaf855751
1 changed files with 6 additions and 2 deletions
|
@ -53,6 +53,8 @@ class del_user:
|
||||||
login, home = args.split(',')
|
login, home = args.split(',')
|
||||||
if not login or not home:
|
if not login or not home:
|
||||||
raise ValueError('Argument invalide')
|
raise ValueError('Argument invalide')
|
||||||
|
if home.startswith('/home/') and hostname == "fx":
|
||||||
|
home = "/home-adh/" + home[6:]
|
||||||
warn = ''
|
warn = ''
|
||||||
f = '%s/files/%s_%s.tar.bz2' % (config.cimetiere,
|
f = '%s/files/%s_%s.tar.bz2' % (config.cimetiere,
|
||||||
strftime('%Y-%m-%d-%Hh%Mm'),
|
strftime('%Y-%m-%d-%Hh%Mm'),
|
||||||
|
@ -103,6 +105,8 @@ class home:
|
||||||
anim('\t' + args)
|
anim('\t' + args)
|
||||||
try:
|
try:
|
||||||
home, uid, login = args.split(',')
|
home, uid, login = args.split(',')
|
||||||
|
if home.startswith('/home/') and hostname == "fx":
|
||||||
|
home = "/home-adh/" + home[6:]
|
||||||
### Home
|
### Home
|
||||||
if not os.path.exists(home):
|
if not os.path.exists(home):
|
||||||
# Le home n'existe pas
|
# Le home n'existe pas
|
||||||
|
@ -128,8 +132,8 @@ class home:
|
||||||
### Mail
|
### Mail
|
||||||
os.mkdir(home + '/Mail', 0700)
|
os.mkdir(home + '/Mail', 0700)
|
||||||
os.chown(home + '/Mail', int(uid), config.gid)
|
os.chown(home + '/Mail', int(uid), config.gid)
|
||||||
os.mkdir('/home/mail/' + login, 0770)
|
os.mkdir('/home-adh/mail/' + login, 0770)
|
||||||
os.chown('/home/mail/' + login, int(uid), 8)
|
os.chown('/home-adh/mail/' + login, int(uid), 8)
|
||||||
|
|
||||||
except:
|
except:
|
||||||
print ERREUR
|
print ERREUR
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue