use actual boolean state for some simple vars

Gbp-Dch: Ignore
This commit is contained in:
Lyndon Brown 2020-02-20 08:12:54 +00:00 committed by Raphaël Hertzog
parent 2c78d36bd5
commit 8545c048c6
3 changed files with 9 additions and 9 deletions

View File

@ -148,9 +148,10 @@ fi
dd if=/dev/zero of=chroot/binary.img bs=1024k count=0 seek=${REAL_DIM}
FREELO="$(${LB_LOSETUP} -f)"
MAKEDEV=false
if [ ! -b chroot/${FREELO} ]
then
MAKEDEV="true"
MAKEDEV=true
mv chroot/dev chroot/dev.tmp
find /dev | cpio -dmpu chroot
@ -343,8 +344,7 @@ Lodetach ${FREELO}
echo "!!! The above error/warning messages can be ignored !!!"
if [ -n "${MAKEDEV}" ]
then
if $MAKEDEV; then
rm -rf chroot/dev
mv chroot/dev.tmp chroot/dev
fi

View File

@ -114,10 +114,11 @@ case "${LB_CHROOT_FILESYSTEM}" in
true)
dd if=/dev/zero of=chroot/filesystem.${LB_CHROOT_FILESYSTEM} bs=1024k count=0 seek=${REAL_DIM}
FAKE_MTAB=false
if ! Chroot chroot "test -s /etc/mtab"
then
Chroot chroot "ln -s /proc/mounts/mtab /etc/mtab"
FAKE_MTAB="true"
FAKE_MTAB=true
fi
Chroot chroot "mkfs.${LB_CHROOT_FILESYSTEM} -F -b 1024 -N ${REAL_INODES} -m 0 filesystem.${LB_CHROOT_FILESYSTEM}"
@ -126,8 +127,7 @@ case "${LB_CHROOT_FILESYSTEM}" in
mount -o loop chroot/filesystem.${LB_CHROOT_FILESYSTEM} filesystem.tmp
cp -a chroot/chroot/* filesystem.tmp
if [ "${FAKE_MTAB}" = "true" ]
then
if $FAKE_MTAB; then
Chroot chroot "rm -f /etc/mtab"
fi

View File

@ -65,10 +65,11 @@ fi
DU_DIM="$(du -ms source | cut -f1)"
REAL_DIM="$(Calculate_partition_size ${DU_DIM} ${LB_BINARY_FILESYSTEM})"
dd if=/dev/zero of=${LIVE_IMAGE_NAME}-source.img bs=1024k count=0 seek=${REAL_DIM}
MAKEDEV=false
FREELO="$(${LB_LOSETUP} -f)"
if [ ! -b chroot/${FREELO} ]
then
MAKEDEV="true"
MAKEDEV=true
mv chroot/dev chroot/dev.tmp
find /dev | cpio -dmpu chroot
@ -142,8 +143,7 @@ Losetup "$FREELO" ${LIVE_IMAGE_NAME}-source.img 0
Chroot chroot "parted -s ${FREELO} set 1 lba off" || true
Lodetach ${FREELO}
if [ -n "${MAKEDEV}" ]
then
if $MAKEDEV; then
rm -rf chroot/dev
mv chroot/dev.tmp chroot/dev
fi