[pkg-fso-commits] [SCM] Various non-packaged files branch, master, updated. 6c7e2719b9dc1f0b77ef4294819f12979599c545
Steffen Moeller
moeller at debian.org
Sat Mar 14 16:24:00 UTC 2009
The following commit has been merged in the master branch:
commit 6c7e2719b9dc1f0b77ef4294819f12979599c545
Author: Steffen Moeller <moeller at debian.org>
Date: Sat Mar 14 17:20:15 2009 +0100
Correcting for test on -n on SD_SWAP_SIZE
Implementing fix committed by Timo Juhani Lindfors on 14/3/09.
The for SD_SWAP_SIZE is 0 and not "" , the test on -n hence
does not work.
Extra tests on -z SD_SWAP_SIZE were added to ensure that an
empty SD_SWAP_SIZE is also set to 0 and will not remain "".
diff --git a/install.sh b/install.sh
index f19b7cd..e46a8a9 100755
--- a/install.sh
+++ b/install.sh
@@ -535,6 +535,8 @@ action_partition () {
rootpartno=2
bootfstypeno=83
+ if [ -z "$SD_SWAP_SIZE" ]; then SD_SWAP_SIZE=0; fi
+
mb=$(echo pq | fdisk ${SD_DEVICE} | grep Disk| cut -f 3 -d \ )
cylinders=$(echo pq | fdisk ${SD_DEVICE} | grep cylinders|grep heads|cut -f 5 -d\ )
lastcylinder=$(($cylinders-($cylinders*$SD_SWAP_SIZE/$mb)))
@@ -646,17 +648,19 @@ action_format () {
card_data_warning format
umount_all
+ if [ -z "$SD_SWAP_SIZE" ]; then SD_SWAP_SIZE=0; fi
+
echo " * Formatting the microSD card partitions"
if [ "$SINGLE_PART" = "true" ]; then
mkfs.ext2 ${SD_DEVICE}p1
- if [ -n "$SD_SWAP_SIZE" ]; then
+ if [ 0 -lt "$SD_SWAP_SIZE" ]; then
echo " * Formatting swap on ${SD_DEVICE}p2"
mkswap ${SD_DEVICE}p2
fi
else
mkfs.$SD_PART1_FS ${SD_DEVICE}p1
mkfs.$SD_PART2_FS ${SD_DEVICE}p2
- if [ -n "$SD_SWAP_SIZE" ]; then
+ if [ 0 -lt "$SD_SWAP_SIZE" ]; then
echo " * Formatting swap on ${SD_DEVICE}p3"
mkswap ${SD_DEVICE}p3
fi
@@ -861,6 +865,8 @@ action_configuration () {
chroot "$INST_DIR" apt-get $APT_OPTIONS install localepurge
fi
+ if [ -z "$SD_SWAP_SIZE" ]; then SD_SWAP_SIZE=0; fi
+
echo " * Installing the fso-config-${FSO_DEVICE} package"
chroot "$INST_DIR" apt-get $APT_OPTIONS install fso-config-${FSO_DEVICE}
--
Various non-packaged files
More information about the pkg-fso-commits
mailing list