mirror of
https://github.com/fsquillace/junest.git
synced 2026-01-23 02:34:30 +00:00
Groot: Do not umount directories that are not mountpoint
This commit is contained in:
parent
b9e34d3e96
commit
137788a98a
2 changed files with 41 additions and 7 deletions
|
|
@ -43,7 +43,7 @@ function chroot_teardown() {
|
|||
local final_res=0
|
||||
for mp in $($CAT $MOUNTS_FILE | $CUT -f2 -d' ' | $SORT -r | $UNIQ)
|
||||
do
|
||||
if [[ $mp =~ ^${normalized_chrootdir}.* ]]
|
||||
if [[ $mp =~ ^${normalized_chrootdir}.* ]] && $MOUNTPOINT -q "$mp"
|
||||
then
|
||||
$UMOUNT $mp || final_res=$?
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue