Skip to content

Commit

Permalink
Mount NFS without restarting VM (fixes #3) (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
aambekar-box authored and kunalparmar committed Jul 10, 2019
1 parent 3f21278 commit 21d5879
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions minikube-nfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,6 @@ sudo umount -i /Users'
sudo mkdir -p \""$shared_folder"\""
done

bootlocalsh="${bootlocalsh}
sudo /usr/local/etc/init.d/nfs-client start"

for shared_folder in "${prop_shared_folders[@]}"
do
bootlocalsh="${bootlocalsh}
Expand All @@ -326,21 +323,10 @@ sudo mount -t nfs -o "$prop_mount_options" "$prop_nfshost_ip":\""$shared_folder"
sleep 2

echoSuccess "OK"
}

# @info: Restarts machine
restartMachine()
{
if isPropertyNotSet $prop_profile_name; then
echoError "'prop_profile_name' not set!"; exit 1;
fi

echoInfo "Stopping machine ...\n"
minikube stop -p $prop_profile_name
echoSuccess "\t\t\t\t\t\t\tOK"

echoInfo "Starting machine ...\n"
minikube start -p $prop_profile_name
echoInfo "Mounting NFS ...\n"
minikube ssh -p $prop_profile_name \
"sudo $file"
echoSuccess "\t\t\t\t\t\t\tOK"
}

Expand Down Expand Up @@ -420,7 +406,6 @@ echo #EMPTY LINE
configureNFS

configureBoot2Docker
restartMachine

verifyNFSMount

Expand Down

0 comments on commit 21d5879

Please sign in to comment.