diff --git a/Bundler/nfs-server.xml b/Bundler/nfs-server.xml index b67f8d3..43068dc 100644 --- a/Bundler/nfs-server.xml +++ b/Bundler/nfs-server.xml @@ -2,7 +2,7 @@ - + diff --git a/Cfg/etc/exports/exports b/Cfg/etc/exports/exports deleted file mode 100644 index e530ed2..0000000 --- a/Cfg/etc/exports/exports +++ /dev/null @@ -1,14 +0,0 @@ -# /etc/exports: the access control list for filesystems which may be exported -# to NFS clients. See exports(5). -# -# Example for NFSv2 and NFSv3: -# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check) -# -# Example for NFSv4: -# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check) -# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check) -# -/home-adh 10.231.136.0/24(rw,async,no_subtree_check,no_root_squash) -/usr/scripts 10.231.136.0/24(rw,async,no_subtree_check,no_root_squash) -/home-adh 2a01:240:fe3d:c804::/64(rw,async,no_subtree_check,no_root_squash) -/usr/scripts 2a01:240:fe3d:c804::/64(rw,async,no_subtree_check,no_root_squash) diff --git a/Python/etc/exports b/Python/etc/exports new file mode 100644 index 0000000..c6d1b34 --- /dev/null +++ b/Python/etc/exports @@ -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) +