nfs: gen auto des dossiers exportables
This commit is contained in:
parent
07f303ad70
commit
c8dadcc7c2
3 changed files with 19 additions and 15 deletions
18
Python/etc/exports
Normal file
18
Python/etc/exports
Normal file
|
@ -0,0 +1,18 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
header("""Liste des dossiers exportés par le nfs""")
|
||||
import gestion.config as config
|
||||
import string
|
||||
import os
|
||||
|
||||
|
||||
home_adh = list(string.ascii_lowercase) + ['logs', 'mail']
|
||||
dirs = map(lambda x: os.path.join('/home-adh', x), home_adh)
|
||||
dirs += ['/usr/scripts', '/home-adh']
|
||||
allowed = config.NETs['adm'] + config.prefix['adm']
|
||||
tpl = "%s %s(rw,async,nohide,no_subtree_check,no_root_squash)"
|
||||
|
||||
for dir in dirs:
|
||||
for cidr in allowed:
|
||||
print tpl % (dir, cidr)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue