summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/binary_hdd6
-rwxr-xr-xscripts/build/binary_rootfs6
-rwxr-xr-xscripts/build/source_hdd6
3 files changed, 9 insertions, 9 deletions
diff --git a/scripts/build/binary_hdd b/scripts/build/binary_hdd
index b631b8576..e75019ff3 100755
--- a/scripts/build/binary_hdd
+++ b/scripts/build/binary_hdd
@@ -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
diff --git a/scripts/build/binary_rootfs b/scripts/build/binary_rootfs
index 51c3c5aba..77f466c07 100755
--- a/scripts/build/binary_rootfs
+++ b/scripts/build/binary_rootfs
@@ -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
diff --git a/scripts/build/source_hdd b/scripts/build/source_hdd
index bed0a79c2..898be4617 100755
--- a/scripts/build/source_hdd
+++ b/scripts/build/source_hdd
@@ -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