Merge branch 'unmount-resilience' into 'master'

Draft: Make unmounting of /proc and /sys more resilient

See merge request live-team/live-build!236
This commit is contained in:
Marcel Partap 2025-01-09 04:02:30 +00:00
commit 9c2db35305
2 changed files with 14 additions and 8 deletions

View File

@ -63,10 +63,13 @@ case "${_ACTION}" in
fi
# Unmounting /proc
if [ -e chroot/proc/version ]
then
umount chroot/proc
fi
ATTEMPT=0
while [ -e chroot/proc/version ] && [ ${ATTEMPT} -lt 42 ]
do
umount -v chroot/proc && break || { fuser --verbose --ismountpoint chroot/proc && sleep 1; }
ATTEMPT=$(( ATTEMPT + 1 ))
done
unset ATTEMPT
# Removing stage file
Remove_stagefile

View File

@ -63,10 +63,13 @@ case "${_ACTION}" in
fi
# Unmounting /sys
if [ -e chroot/sys/class ]
then
umount chroot/sys
fi
ATTEMPT=0
while [ -e chroot/sys/class ] && [ ${ATTEMPT} -lt 42 ]
do
umount -v chroot/sys && break || { fuser --verbose --ismountpoint chroot/sys && sleep 1; }
ATTEMPT=$(( ATTEMPT + 1 ))
done
unset ATTEMPT
# Removing stage file
Remove_stagefile