]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
flash-images: move sleep 1 to a better place
authorArne Fitzenreiter <arne_f@ipfire.org>
Thu, 24 Oct 2024 06:18:07 +0000 (08:18 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Thu, 24 Oct 2024 06:18:07 +0000 (08:18 +0200)
kpartx trigger the automount feature of some desktop environments
which result in a mounted filesystem if it was created to fast after
kpartx.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
lfs/flash-images

index 695eb4b6b5541c0664f1d716e46d30d31bd26d10..2f3010fc4d608f8d709cef544bf7651ccd2f2964 100644 (file)
@@ -112,6 +112,11 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 
        kpartx -v -a $(DEVICE)
 
+       # kpartx trigger a automount on some desktop enviroments
+       # this leads in failing zerofree after build and umount the image
+       # with the sleep 1 prevent this because the image has no fs yet.
+       sleep 1
+
        # Format them
 ifeq "$(PART_TYPE)" "c"
        mkfs.vfat $(PART_BOOT)
@@ -225,9 +230,6 @@ endif
        umount $(MNThdd)/boot
        umount $(MNThdd)
 
-       # sometime zerofree will fail without this
-       sleep 1
-
        # zerofree the ext4 images to get better compression
 ifneq "$(PART_TYPE)" "c"
        zerofree $(PART_BOOT)