diff options
author | Chris Lamb <chris@chris-lamb.co.uk> | 2008-06-15 16:20:55 +0100 |
---|---|---|
committer | Chris Lamb <chris@chris-lamb.co.uk> | 2008-06-15 16:20:55 +0100 |
commit | d522b02fc1ce52670d28cfa84f07cef7b745859a (patch) | |
tree | b7709de031be5e03d565f46d273ee643c8c8b663 /helpers | |
parent | 802c604984be100df63d4aa7b1847699b76e0b59 (diff) | |
download | vyos-live-build-d522b02fc1ce52670d28cfa84f07cef7b745859a.tar.gz vyos-live-build-d522b02fc1ce52670d28cfa84f07cef7b745859a.zip |
Refactor partition table type handling.
Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
Diffstat (limited to 'helpers')
-rwxr-xr-x | helpers/lh_binary_usb-hdd | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/helpers/lh_binary_usb-hdd b/helpers/lh_binary_usb-hdd index 9b8c2c5f5..4b2ba8152 100755 --- a/helpers/lh_binary_usb-hdd +++ b/helpers/lh_binary_usb-hdd @@ -91,6 +91,12 @@ fi echo "!!! The following error/warning messages can be ignored !!!" Losetup $FREELO chroot/binary.img 0 +case "${LH_ARCHITECTURE}" in + *) + PARTITION_TABLE_TYPE="msdos" + ;; +esac + case "${LH_BINARY_FILESYSTEM}" in fat16|fat32) PARTITION_TYPE="${LH_BINARY_FILESYSTEM}" @@ -104,7 +110,7 @@ esac case "${LH_CHROOT_BUILD}" in enabled) - Chroot "parted -s ${FREELO} mklabel msdos" || true + Chroot "parted -s ${FREELO} mklabel ${PARTITION_TABLE_TYPE}" || 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 @@ -116,7 +122,7 @@ case "${LH_CHROOT_BUILD}" in ;; disabled) - parted -s ${FREELO} mklabel msdos || true + parted -s ${FREELO} mklabel ${PARTITION_TABLE_TYPE} || 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 |