[build]: remove 15s sleep in build_debian.sh (#16672)

Remove 15s unconditional sleep.
Instead check every second that /proc is not mounted.
Go to the next step if /proc is not mounted anymore or after 15s.
This commit is contained in:
Konstantin Vasin 2023-09-28 19:00:50 +03:00 committed by GitHub
parent be7a95b042
commit a12b42f94c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -760,8 +760,7 @@ sudo LANG=C chroot $FILESYSTEM_ROOT fuser -vm /proc
## Kill the processes
sudo LANG=C chroot $FILESYSTEM_ROOT fuser -km /proc || true
## Wait fuser fully kill the processes
sleep 15
sudo LANG=C chroot $FILESYSTEM_ROOT umount /proc || true
sudo timeout 15s bash -c 'until LANG=C chroot $0 umount /proc; do sleep 1; done' $FILESYSTEM_ROOT || true
## Prepare empty directory to trigger mount move in initramfs-tools/mount_loop_root, implemented by patching
sudo mkdir $FILESYSTEM_ROOT/host