[generate.py] fx -> daath (création home+mail_bienvenue)
Ignore-this: e6de9e7106f3779e467889196590a40b darcs-hash:20120827140156-28565-53e596260b3c8af9891cee12b5669cadab7919f1.gz
This commit is contained in:
parent
84d7e65368
commit
3591768b32
3 changed files with 9 additions and 23 deletions
|
@ -45,7 +45,7 @@ class del_user:
|
|||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
def delete_fx(self):
|
||||
def delete_daath(self):
|
||||
cprint(u'Archivage fichiers utilisateur', 'gras')
|
||||
for args in self.args:
|
||||
anim('\t' + args)
|
||||
|
@ -53,7 +53,7 @@ class del_user:
|
|||
login, home = args.split(',')
|
||||
if not login or not home:
|
||||
raise ValueError('Argument invalide')
|
||||
if home.startswith('/home/') and hostname == "fx":
|
||||
if home.startswith('/home/') and hostname == "daath":
|
||||
home = "/home-adh/" + home[6:]
|
||||
warn = ''
|
||||
f = '%s/files/%s_%s.tar.bz2' % ('/home-adh/cimetiere',
|
||||
|
@ -84,8 +84,8 @@ class del_user:
|
|||
traceback.print_exc()
|
||||
|
||||
def reconfigure(self):
|
||||
if hostname == "fx":
|
||||
self.delete_fx()
|
||||
if hostname == "daath":
|
||||
self.delete_daath()
|
||||
elif hostname == "owl":
|
||||
self.delete_directory(u"Suppression des fichiers index de dovecot",
|
||||
"/var/dovecot-indexes/%s")
|
||||
|
@ -109,7 +109,8 @@ class home:
|
|||
except ValueError:
|
||||
home, uid, login = args.split(',')
|
||||
mail_redirect = None
|
||||
if home.startswith('/home/') and hostname == "fx":
|
||||
# Kludge pour daath (nfs) normalement inutile
|
||||
if home.startswith('/home/') and hostname == "daath":
|
||||
home = "/home-adh/" + home[6:]
|
||||
### Home
|
||||
if not os.path.exists(home):
|
||||
|
|
|
@ -69,7 +69,7 @@ class autostatus(gen_config) :
|
|||
"rouge.crans.org", # RIP --> domU redisdead
|
||||
"slon.adm.crans.org", # --> cf nols
|
||||
"ragnarok.crans.org", # RIP contrôleur disque...
|
||||
"fx.crans.org", # s'appelle désormais zamok
|
||||
"zamok.crans.org", # c'est en fait fx
|
||||
|
||||
# Bornes wifi de test
|
||||
"bullet5.wifi.crans.org",
|
||||
|
|
|
@ -48,7 +48,7 @@ class base_reconfigure:
|
|||
'blacklist_autodisc_upload': [ 'sable-blacklist_autodisc_upload', 'komaz-blacklist', 'zamok-blacklist'],
|
||||
'blacklist_autodisc_p2p': [ 'sable-blacklist_autodisc_p2p', 'komaz-blacklist', 'zamok-blacklist'],
|
||||
'blacklist_bloq': [ 'komaz-blacklist', 'sable-blacklist_bloq', 'zamok-blacklist', 'dns' ],
|
||||
'del_user': [ 'fx-del_user', 'owl-del_user', 'zamok-del_user' ]
|
||||
'del_user': [ 'daath-del_user', 'owl-del_user', 'zamok-del_user' ]
|
||||
}
|
||||
|
||||
def __init__(self, to_do=None):
|
||||
|
@ -191,7 +191,7 @@ class zamok(base_reconfigure):
|
|||
from firewall import firewall_zamok
|
||||
firewall_zamok().blacklist()
|
||||
|
||||
class fx(base_reconfigure):
|
||||
class daath(base_reconfigure):
|
||||
def home(self, args):
|
||||
from adherents import home
|
||||
self._do(home(args))
|
||||
|
@ -344,21 +344,6 @@ class gordon(base_reconfigure) :
|
|||
from gen_confs.dhcpd_new import dhcp
|
||||
self._do(dhcp(), self._machines())
|
||||
|
||||
|
||||
|
||||
class vert(base_reconfigure):
|
||||
def home(self, args):
|
||||
from adherents import home
|
||||
self._do(home(args))
|
||||
|
||||
def del_user(self, args):
|
||||
from adherents import del_user
|
||||
self._do(del_user(args))
|
||||
|
||||
def mail_bienvenue(self, mails):
|
||||
from adherents import mail_bienvenue
|
||||
self._do(mail_bienvenue(mails))
|
||||
|
||||
class titanic(base_reconfigure):
|
||||
def dhcp(self):
|
||||
from gen_confs.dhcpd_new import dhcp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue