armbian-next: replace bare sync invocations by introducing wait_for_disk_sync(); sync early at start of build

- wait 10s for sync call; otherwise warn user to be patient
- wait_for_sync "reason for sync" everywhere
- add @TODO for /run/user/0 etc and XDG_RUNTIME_DIR in chroot
This commit is contained in:
Ricardo Pardini
2023-01-20 01:44:46 +01:00
parent 4d43c05f7b
commit 72c61f2f68
9 changed files with 52 additions and 22 deletions

View File

@@ -80,7 +80,7 @@ function create_image_from_sdcard_rootfs() {
run_host_command_logged sfdisk -l "${LOOP}" # @TODO: use asset..
fi
run_host_command_logged sync
wait_for_disk_sync "before umount MOUNT"
umount_chroot_recursive "${MOUNT}" "MOUNT"
[[ $CRYPTROOT_ENABLE == yes ]] && cryptsetup luksClose "$ROOT_MAPPER"