add timer between uses of losetup, should fix mount issues...

pull/10/head
Raphaël Vinot 2014-10-05 17:32:52 +02:00
parent d3e18d2dcb
commit 403f5fae7c
1 changed files with 6 additions and 0 deletions

View File

@ -23,6 +23,8 @@ losetup -o$((8192 * 512)) ${lo} ${IMAGE_DEST}
mkfs.vfat ${lo} mkfs.vfat ${lo}
losetup -d ${lo} losetup -d ${lo}
sleep 5
for f in $FS; do for f in $FS; do
# Create files of 128Mb # Create files of 128Mb
OUT_NAME_NORM="testcase."${f} OUT_NAME_NORM="testcase."${f}
@ -42,23 +44,27 @@ for f in $FS; do
losetup -o$((122880 * 512)) ${lo} ${OUT_NAME_PART} losetup -o$((122880 * 512)) ${lo} ${OUT_NAME_PART}
mkfs.${f} ${lo} 39360 mkfs.${f} ${lo} 39360
losetup -d ${lo} losetup -d ${lo}
sleep 5
parted -s ${OUT_NAME_NORM} mkpart primary 8192s 201599s parted -s ${OUT_NAME_NORM} mkpart primary 8192s 201599s
losetup -o$((8192 * 512)) ${lo} ${OUT_NAME_NORM} losetup -o$((8192 * 512)) ${lo} ${OUT_NAME_NORM}
mkfs.${f} ${lo} mkfs.${f} ${lo}
losetup -d ${lo} losetup -d ${lo}
sleep 5
elif [ $f = ${FS_NTFS} ]; then elif [ $f = ${FS_NTFS} ]; then
parted -s ${OUT_NAME_NORM} mkpart primary 8192s 201599s parted -s ${OUT_NAME_NORM} mkpart primary 8192s 201599s
lo=`losetup -f` lo=`losetup -f`
losetup -o$((8192 * 512)) ${lo} ${OUT_NAME_NORM} losetup -o$((8192 * 512)) ${lo} ${OUT_NAME_NORM}
mk${f} -f -I ${lo} mk${f} -f -I ${lo}
losetup -d ${lo} losetup -d ${lo}
sleep 5
else else
parted -s ${OUT_NAME_NORM} mkpart primary 8192s 201599s parted -s ${OUT_NAME_NORM} mkpart primary 8192s 201599s
lo=`losetup -f` lo=`losetup -f`
losetup -o$((8192 * 512)) ${lo} ${OUT_NAME_NORM} losetup -o$((8192 * 512)) ${lo} ${OUT_NAME_NORM}
mkfs.${f} ${lo} mkfs.${f} ${lo}
losetup -d ${lo} losetup -d ${lo}
sleep 5
fi fi
done done