Concentrating all parted calls within lb_binary_hdd into one place in order to make things simpler.

This commit is contained in:
Daniel Baumann 2012-07-31 19:30:59 +02:00
parent b2eb7a885b
commit 281e42d267
1 changed files with 4 additions and 17 deletions

View File

@ -176,6 +176,8 @@ case "${LB_BUILD_WITH_CHROOT}" in
true)
Chroot chroot "parted -s ${FREELO} mklabel ${PARTITION_TABLE_TYPE}" || true
Chroot chroot "parted -s ${FREELO} mkpart primary ${PARTITION_TYPE} 0.0 100%" || true
Chroot chroot "parted -s ${FREELO} set 1 boot on" || true
Chroot chroot "parted -s ${FREELO} set 1 lba off" || true
if [ "${LB_BOOTLOADER}" = "syslinux" ]
then
@ -186,6 +188,8 @@ case "${LB_BUILD_WITH_CHROOT}" in
false)
parted -s ${FREELO} mklabel ${PARTITION_TABLE_TYPE} || true
parted -s ${FREELO} mkpart primary ${PARTITION_TYPE} 0.0 100% || true
parted -s "${FREELO}" set 1 boot on || true
parted -s "${FREELO}" set 1 lba off || true
if [ "${LB_BOOTLOADER}" = "syslinux" ]
then
@ -292,23 +296,6 @@ Lodetach ${FREELO}
echo "!!! The above error/warning messages can be ignored !!!"
FREELO="$(${LB_LOSETUP} -f)"
Losetup "${FREELO}" chroot/binary.img 0
case "${LB_BUILD_WITH_CHROOT}" in
true)
Chroot chroot "parted -s ${FREELO} set 1 boot on" || true
Chroot chroot "parted -s ${FREELO} set 1 lba off" || true
;;
false)
parted -s "${FREELO}" set 1 boot on || true
parted -s "${FREELO}" set 1 lba off || true
;;
esac
Lodetach ${FREELO}
if [ -n "${MAKEDEV}" ]
then
rm -rf chroot/dev