@@ -57,6 +57,7 @@ Options:
5757 -f, --force Force reconfiguration of nfs
5858 -n, --nfs-config NFS configuration to use in /etc/exports. (default to '-alldirs -mapall=\$ (id -u):\$ (id -g)')
5959 -s, --shared-folder,... Folder to share (default to /Users)
60+ -m, --mount-opts NFS mount options (default to 'noacl,async')
6061
6162Examples:
6263
@@ -72,6 +73,10 @@ Examples:
7273
7374 > Configure the /var/www folder with NFS and the options '-alldirs -maproot=0'
7475
76+ $ docker-machine-nfs test --mount-opts="noacl,async,nolock,vers=3,udp,noatime,actimeo=1"
77+
78+ > Configure the /User folder with NFS and specific mount options.
79+
7580EOF
7681 exit 0
7782}
@@ -124,6 +129,7 @@ setPropDefaults()
124129 prop_machine_name=
125130 prop_shared_folders=()
126131 prop_nfs_config=" -alldirs -mapall=" $( id -u) :$( id -g)
132+ prop_mount_options=" noacl,async"
127133 prop_force_configuration_nfs=false
128134}
129135
@@ -154,6 +160,11 @@ parseCli()
154160 prop_nfs_config=" ${i#* =} "
155161 ;;
156162
163+ -m=* |--mount-opts=* )
164+ prop_mount_options=" ${i#* =} "
165+ ;;
166+
167+
157168 -f|--force)
158169 prop_force_configuration_nfs=true
159170 shift
@@ -181,6 +192,8 @@ parseCli()
181192 do
182193 echoProperties " Shared Folder: $shared_folder "
183194 done
195+
196+ echoProperties " Mount Options: $prop_mount_options "
184197 echoProperties " Force: $prop_force_configuration_nfs "
185198
186199 echo # EMPTY
@@ -360,7 +373,7 @@ configureBoot2Docker()
360373 for shared_folder in " ${prop_shared_folders[@]} "
361374 do
362375 bootlocalsh=" ${bootlocalsh}
363- sudo mount -t nfs -o noacl,async " $prop_nfshost_ip " :" $shared_folder " " $shared_folder
376+ sudo mount -t nfs -o " $prop_mount_options " " $prop_nfshost_ip " :" $shared_folder " " $shared_folder
364377 done
365378
366379 local file=" /var/lib/boot2docker/bootlocal.sh"
0 commit comments