File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3+ set -eu
4+
35script_path=" $( cd -P " $( dirname " $( readlink -f " $0 " ) " ) " && cd .. && pwd ) "
46work_dir=" ${script_path} /work"
57debug=false
@@ -92,12 +94,13 @@ umount_chroot () {
9294 if [[ ! -d " ${work_dir} " ]]; then
9395 return 0
9496 fi
95- for _mount in $( cat " /proc/mounts" | getclm 2 | grep " $( realpath -s ${work_dir} ) " | tac | grep -xv " $( realpath -s ${work_dir} ) / ${arch} /airootfs " ) ; do
97+ for _mount in $( cat " /proc/mounts" | getclm 2 | grep " $( realpath -s ${work_dir} ) " | tac | grep -xv " $( realpath -s " ${work_dir} " ) " ) ; do
9698 if echo " ${_mount} " | grep " ${work_dir} " > /dev/null 2>&1 || echo " ${_mount} " | grep " ${script_path} " > /dev/null 2>&1 || echo " ${_mount} " | grep " ${out_dir} " > /dev/null 2>&1 ; then
9799 msg_info " Unmounting ${_mount} "
98100 _umount " ${_mount} " 2> /dev/null
99101 else
100102 msg_error " It is dangerous to unmount a directory that is not managed by the script."
103+ msg_error " Path: ${_mount} "
101104 fi
102105 done
103106}
You can’t perform that action at this time.
0 commit comments