Changeset 5219


Ignore:
Timestamp:
Jun 19, 2017, 10:32:35 AM (18 months ago)
Author:
hectorgh
Message:

enabling no_root_squash

Location:
n4d-nfs/trunk/fuentes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • n4d-nfs/trunk/fuentes/debian/changelog

    r5073 r5219  
     1n4d-nfs (0.4) xenial; urgency=high
     2
     3  * Enabling no_root_squash. As of today, jclic-shared forces us to do this.
     4
     5 -- Hector Garcia Huerta <hectorgh@gmail.com>  Mon, 19 Jun 2017 10:30:32 +0200
     6
    17n4d-nfs (0.3) xenial; urgency=high
    28
  • n4d-nfs/trunk/fuentes/debian/postinst

    r4885 r5219  
    2525        n4d-modules enable-plugin /etc/n4d/conf.d/NfsManager || true
    2626
     27        if dpkg --compare-versions "$2" lt 0.4; then
     28                EXPORTS_FILE="/etc/exports.d/net.exports"
     29                if [ -e "$EXPORTS_FILE" ]; then
     30                        rc=0
     31                        grep "no_root_squash" "$EXPORTS_FILE" 1> /dev/null || rc=1
     32                        if [ $rc -eq 1  ]; then
     33                                python -c "import imp;imp.load_source('NfsManager','/usr/share/n4d/python-plugins/NfsManager.py').NfsManager().fix_missing_no_root_squash()"
     34                                exportfs -ra || true
     35                        fi
     36                fi
     37
     38        fi
     39
     40
    2741        ;;
     42
     43
    2844
    2945
  • n4d-nfs/trunk/fuentes/install/usr/share/n4d/python-plugins/NfsManager.py

    r4886 r5219  
    1414                self.nfs_dir="/etc/exports.d/"
    1515                self.nfs_file=self.nfs_dir+"net.exports"
    16                 self.default_options="rw,sync,no_subtree_check"
     16                self.default_options="rw,sync,no_subtree_check,no_root_squash"
    1717                self.regex_pattern="^(/[\-/\w]+)(\s+)((((\d{1,3}\.){3}\d{1,3})|\w+)\((.*)\)(\s+|$))+"
    1818                self.file_header="#\n# File generated by NfsManager plugin. Do not edit\n#\n\n"
     
    7575                for d in exports:
    7676                        for ip in exports[d]:
    77                                 if "no_root_squash" in exports[d][ip]:
     77                                if "no_root_squash" not in exports[d][ip]:
    7878                                        exports[d][ip]+=",no_root_squash"
    7979
Note: See TracChangeset for help on using the changeset viewer.