Sync to disk before un-mounting
This commit is contained in:
parent
23f1212b00
commit
f8c9dd684c
@ -39,6 +39,9 @@ umount_kill() {
|
|||||||
# since we are doing an exact string match on the path
|
# since we are doing an exact string match on the path
|
||||||
MOUNTDIR=$(echo "${MOUNTDIR}" | sed s#//*#/#g)
|
MOUNTDIR=$(echo "${MOUNTDIR}" | sed s#//*#/#g)
|
||||||
|
|
||||||
|
# Sync the disk befoe un-mounting to be sure everything is written
|
||||||
|
sync
|
||||||
|
|
||||||
warn "-> Attempting to kill any processes still running in '${MOUNTDIR}' before un-mounting"
|
warn "-> Attempting to kill any processes still running in '${MOUNTDIR}' before un-mounting"
|
||||||
for dir in $(sudo grep "${MOUNTDIR}" /proc/mounts | cut -f2 -d" " | sort -r | grep "^${MOUNTDIR}")
|
for dir in $(sudo grep "${MOUNTDIR}" /proc/mounts | cut -f2 -d" " | sort -r | grep "^${MOUNTDIR}")
|
||||||
do
|
do
|
||||||
|
Loading…
Reference in New Issue
Block a user