summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorChris Lamb <chris@chris-lamb.co.uk>2008-06-15 16:48:47 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:03:35 +0100
commit51a75d515a76183a7c4c5a788d4017a968706b79 (patch)
tree5af6d40f493b39f4d9b4e0f1f00b7eef1c17a7f5 /helpers
parentcc8092771ea2b95cc8e328b7e7042d404379534c (diff)
downloadvyos-live-build-51a75d515a76183a7c4c5a788d4017a968706b79.tar.gz
vyos-live-build-51a75d515a76183a7c4c5a788d4017a968706b79.zip
Add support for ext2 and ext3 to lh_source_usb-hdd.
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_source_usb-hdd30
1 files changed, 26 insertions, 4 deletions
diff --git a/helpers/lh_source_usb-hdd b/helpers/lh_source_usb-hdd
index 3913f9b78..15d6b346e 100755
--- a/helpers/lh_source_usb-hdd
+++ b/helpers/lh_source_usb-hdd
@@ -78,26 +78,48 @@ then
find /dev | cpio -dmpu chroot
fi
+case "${LH_BINARY_FILESYSTEM}" in
+ ext2|ext3)
+ PARTITION_TYPE="ext2"
+ ;;
+
+ fat16|fat32)
+ PARTITION_TYPE="${LH_BINARY_FILESYSTEM}"
+ ;;
+
+ *)
+ Echo_error "Unsupported binary filesystem ${LH_BINARY_FILESYSTEM}"
+ exit 1
+ ;;
+esac
+
echo "!!! The following error/warning messages can be ignored !!!"
Losetup $FREELO source.img 0
Chroot "parted -s ${FREELO} mklabel msdos" || true
-Chroot "parted -s ${FREELO} mkpart primary ${LH_BINARY_FILESYSTEM} 0.0 100%" || true
+Chroot "parted -s ${FREELO} mkpart primary ${PARTITION_TYPE} 0.0 100%" || true
Chroot "parted -s ${FREELO} set 1 lba off" || true
${LH_LOSETUP} -d ${FREELO}
Losetup $FREELO source.img 1
case "${LH_BINARY_FILESYSTEM}" in
+ ext2|ext3)
+ MKFS="${LH_BINARY_FILESYSTEM}"
+ MKFS_OPTIONS="-L DEBIAN_LIVE -m 0"
+ ;;
+
fat16)
- MKFS_OPTIONS="-F 16"
+ MKFS="vfat"
+ MKFS_OPTIONS="-F 16 -n DEBIAN_LIVE"
;;
fat32)
- MKFS_OPTIONS="-F 32"
+ MKFS="vfat"
+ MKFS_OPTIONS="-F 32 -n DEBIAN_LIVE"
;;
esac
-Chroot " mkfs.vfat ${MKFS_OPTIONS} -n DEBIAN_LIVE ${FREELO}"
+Chroot "mkfs.${MKFS} ${MKFS_OPTIONS} ${FREELO}"
mkdir -p source.tmp
${LH_ROOT_COMMAND} mount ${FREELO} source.tmp