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:
commit
9c2db35305
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user