@@ -15,13 +15,10 @@ if [[ ${debug_vagrant_project} -eq 1 ]]; then
15
15
fi
16
16
17
17
host_os=" $( bash " ${vagrant_dir} /scripts/host/get_host_os.sh" ) "
18
-
19
- # TODO: Calculate network IP
18
+ nfs_exports_record=" $( bash " ${vagrant_dir} /scripts/host/get_nfs_exports_record.sh" ) "
20
19
if [[ ${host_os} == " OSX" ]]; then
21
- # TODO: Detect network IP dynamically
22
- nfs_exports_record=" \" ${vagrant_dir} \" -alldirs -mapall=$( id -u) :$( id -g) -mask 255.0.0.0 -network 192.0.0.0"
23
20
if [[ -z " $( grep " ${nfs_exports_record} " /etc/exports) " ]]; then
24
- status " Updating /etc/exports to enable codebase sharing with containers via NFS"
21
+ status " Updating /etc/exports to enable codebase sharing with containers via NFS ( ${nfs_exports_record} ) "
25
22
echo " ${nfs_exports_record} " | sudo tee -a " /etc/exports" 2> >( logError) > >( log)
26
23
sudo nfsd restart
27
24
# TODO: Implement NFS exports clean up on project removal to prevent NFS mounting errors
@@ -31,10 +28,8 @@ if [[ ${host_os} == "OSX" ]]; then
31
28
fi
32
29
33
30
if [[ ${host_os} == " Linux" ]]; then
34
- # TODO: Detect network IP dynamically
35
- nfs_exports_record=" \" ${vagrant_dir} \" 172.17.0.0/255.255.0.0(rw,no_subtree_check,all_squash,anonuid=$( id -u) ,anongid=$( id -g) )"
36
31
if [[ -z " $( grep " ${nfs_exports_record} " /etc/exports) " ]]; then
37
- status " Updating /etc/exports to enable codebase sharing with containers via NFS"
32
+ status " Updating /etc/exports to enable codebase sharing with containers via NFS ( ${nfs_exports_record} ) "
38
33
echo " ${nfs_exports_record} " | sudo tee -a " /etc/exports" 2> >( logError) > >( log)
39
34
sudo service nfs-kernel-server restart
40
35
# TODO: Implement NFS exports clean up on project removal to prevent NFS mounting errors
0 commit comments