summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lamb <chris@chris-lamb.co.uk>2008-06-15 16:17:42 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:03:35 +0100
commitf5dc49aaebdea2020d60ff41797156cb1b0f5a7d (patch)
treeffcaf261d3e23a3ace88638519c8c11111ef020a
parent1edb371113a8b0a6805ab8ff8dd8be5bd3faf0a9 (diff)
downloadvyos-live-build-f5dc49aaebdea2020d60ff41797156cb1b0f5a7d.tar.gz
vyos-live-build-f5dc49aaebdea2020d60ff41797156cb1b0f5a7d.zip
Refactor partition type handling.
-rwxr-xr-xhelpers/lh_binary_usb-hdd15
1 files changed, 13 insertions, 2 deletions
diff --git a/helpers/lh_binary_usb-hdd b/helpers/lh_binary_usb-hdd
index fb4a9f335..9b8c2c5f5 100755
--- a/helpers/lh_binary_usb-hdd
+++ b/helpers/lh_binary_usb-hdd
@@ -91,10 +91,21 @@ fi
echo "!!! The following error/warning messages can be ignored !!!"
Losetup $FREELO chroot/binary.img 0
+case "${LH_BINARY_FILESYSTEM}" in
+ fat16|fat32)
+ PARTITION_TYPE="${LH_BINARY_FILESYSTEM}"
+ ;;
+
+ *)
+ Echo_error "Unsupported binary filesystem ${LH_BINARY_FILESYSTEM}"
+ exit 1
+ ;;
+esac
+
case "${LH_CHROOT_BUILD}" in
enabled)
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 boot on" || true
Chroot "parted -s ${FREELO} set 1 lba off" || true
@@ -106,7 +117,7 @@ case "${LH_CHROOT_BUILD}" in
disabled)
parted -s ${FREELO} mklabel msdos || true
- parted -s ${FREELO} mkpart primary ${LH_BINARY_FILESYSTEM} 0.0 100% || true
+ parted -s ${FREELO} mkpart primary ${PARTITION_TYPE} 0.0 100%
parted -s ${FREELO} set 1 boot on || true
parted -s ${FREELO} set 1 lba off || true