Last active
April 5, 2017 18:33
-
-
Save icheko/d5dcd0d7e70f8c559813 to your computer and use it in GitHub Desktop.
Revisions
-
icheko revised this gist
Mar 17, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
Empty file. -
icheko created this gist
Sep 3, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ #!/bin/sh MNT_PATH=$1 if [ -z "$MNT_PATH" ] then echo "MNT_PATH is not set" exit fi DF_OUTPUT=$((df -h | grep $MNT_PATH) 2>&1) if [[ "$DF_OUTPUT" != *"endpoint is not connected"* ]] then exit; fi echo "NFS is unmounted" echo "================" echo "lazy unmounting $1..." # lazy unmount umount -l $1 echo "sleep...15" # wait sleep 15 echo "mount fstab" # mount mount -a echo "done!" echo "================" df -h