[pkg-fso-maint] [PATCH] install.sh runs mkswap if SD_SWAP_SIZE=0
Steffen Moeller
steffen_moeller at gmx.de
Sat Mar 14 16:25:41 UTC 2009
Hi Timo,
many thanks! I have just corrected it.
Steffen
Timo Juhani Lindfors wrote:
> install.sh compares SD_SWAP_SIZE normally against 0 but it has two
> tests that compare it against "". This causes install.sh to run mkswap
> even if SD_SWAP_SIZE is 0 (the default). Here's a patch:
>
> --- install.sh.orig 2009-03-14 16:32:02.000000000 +0200
> +++ install.sh 2009-03-14 16:31:46.000000000 +0200
> @@ -649,14 +649,14 @@
> 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
More information about the pkg-fso-maint
mailing list