Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,13 @@ function unmount_image() {
force=$2
fi

sync
if [ -n "$force" ]
then
for process in $(sudo lsof $mount_path | awk '{print $2}')
for pid in $(sudo lsof -t $mount_path)
do
echo "Killing process id $process..."
sudo kill -9 $process
echo "Killing process $(ps -p $pid -o comm=) with pid $pid..."
sudo kill -9 $pid
done
fi

Expand Down