From a12b42f94cf35e255f38ca0416d112f15abb752a Mon Sep 17 00:00:00 2001 From: Konstantin Vasin <126960927+k-v1@users.noreply.github.com> Date: Thu, 28 Sep 2023 19:00:50 +0300 Subject: [PATCH] [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. --- build_debian.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build_debian.sh b/build_debian.sh index 505806fdc1..f485f7f67f 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -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