<?xml version="1.0" encoding="utf-8"?>
<creole>

    <files>
        <file filelist='nfs' name='/etc/idmapd.conf'/>
        <file filelist='nfs' name='/etc/modprobe.d/local.conf'/>
        <file filelist='nfs' name='/etc/default/nfs-common'/>
        <file filelist='nfs' name='/etc/default/nfs-kernel-server'/>
        <file filelist='nfs' name='/etc/default/portmap'/>
        <file filelist='nfs' name='/etc/exports' rm='True'/>
        <service servicelist='nfs'>nfs-kernel-server</service>
        <service_access service='nfs'>
            <port>2049</port>
            <port>111</port>
            <port protocol='udp'>111</port>
            <tcpwrapper>portmap</tcpwrapper>
            <port>4005</port>
            <tcpwrapper>lockd</tcpwrapper>
            <port>4003</port>
            <tcpwrapper>mountd</tcpwrapper>
        </service_access>
        <service_restriction service='nfs'>
            <ip interface='auto' ip_type='SymLinkOption'>adresses_ip_clients_nfs</ip>
            <ip interface='auto' netmask='adresses_netmask_clients_nfs' netmask_type='SymLinkOption' ip_type='SymLinkOption'>adresses_network_clients_nfs</ip>
        </service_restriction>
    </files>

    <variables>
        <family name='services'>
            <variable name='activer_serveur_nfs' type='oui/non' description='Activer le serveur NFS'>
                <value>oui</value>
            </variable>
        </family>
        <family name='nfs' icon='share'>
            <variable name='mountpoint_nfs' type='string' description="Point de montage pour les exports NFS">
                <value>/home</value>
            </variable>
            <variable name='access_nfs' type='string' description="Droits d'accès aux exports NFS">
                <value>rw</value>
            </variable>
            <variable name='root_squash_nfs' type='string' description="Droits root sur les exports NFS">
                <value>root_squash</value>
            </variable>
            <variable name='adresses_ip_clients_nfs' type='ip' multi='True' description="Adresse IP autorisée à monter les export NFS"/>
            <variable name='adresses_network_clients_nfs' type='network' multi="True" description="Adresse réseau autorisée à monter les export NFS"/>
            <variable name='adresses_netmask_clients_nfs' type='netmask' multi="True" description="Masque de sous réseau associé à l'adresse"/>
        </family>
    </variables>

    <constraints>
        <condition name='disabled_if_in' source='activer_serveur_nfs'>
            <param>non</param>
            <target type='family'>nfs</target>
            <target type='filelist'>nfs</target>
            <target type='servicelist'>nfs</target>
        </condition>
        <check name='valid_enum' target='access_nfs'>
            <param>['rw', 'ro']</param>
        </check>
        <check name='valid_enum' target='root_squash_nfs'>
            <param>['root_squash', 'no_root_squash']</param>
        </check>
        <group master='adresses_network_clients_nfs'>
            <slave>adresses_netmask_clients_nfs</slave>
        </group>
    </constraints>

    <help>
        <family name='nfs'>Configuration du serveur NFS</family>
        <variable name='activer_serveur_nfs'>NFS (Network File System) est un protocole qui permet de partager des fichiers via le réseau</variable>
        <variable name='mountpoint_nfs'>Répertoire qui sera partagé via le protocole NFS</variable>
        <variable name='adresses_ip_clients_nfs'>Il s'agit généralement de l'adresse du serveur Eclair autorisé à se connecter au module</variable>
    </help>

</creole>
<!-- vim: ts=4 sw=4 expandtab
-->
