commit 256d92097454ee12a60a0899dbf771165da761a3
Author: Miklos Vajna <>
Date:   Thu Jul 30 13:52:33 2009 +0200

handle the case when loop0 is not yet detached when generating the usb image

diff --git a/Makefile b/Makefile
index c6111da..9cb3006 100644
--- a/Makefile
+++ b/Makefile
@@ -206,8 +206,10 @@ usb_img: check_root
ifneq ($(CARCH),ppc)
dd if=/dev/zero of=frugalware-$(FWVER)-$(CARCH)-usb.img bs=516096c 
echo -e 'n\np\n1\n\n\nw'|/sbin/fdisk -u -C$(CYL_COUNT) -S63 -H16 
frugalware-$(FWVER)-$(CARCH)-usb.img || true
+       losetup -d /dev/loop0 || true
losetup -o32256 /dev/loop0 frugalware-$(FWVER)-$(CARCH)-usb.img
/sbin/mke2fs -b1024 -F /dev/loop0
+       sleep 1
losetup -d /dev/loop0
mkdir i
mount -o loop,offset=32256 frugalware-$(FWVER)-$(CARCH)-usb.img i
Frugalware-git mailing list

Reply via email to