[pkg-fso-maint] install.sh: filesystem for first partition

Luca Capello luca at pca.it
Wed Jun 17 23:16:10 UTC 2009


Hi Brian!

On Mon, 15 Jun 2009 17:57:02 +0200, Luca Capello wrote:
> Your refactoring in diff format:
>
>
> --8<---------------cut here---------------start------------->8---
> diff --git a/install.sh b/install.sh
> index a3be9e3..4048c82 100755
> --- a/install.sh
> +++ b/install.sh
> @@ -720,19 +720,15 @@ action_format () {
>  	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 [ 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_PART1_FS ${SD_DEVICE}p1
> +	nextpart=2
> +	if [ "$SINGLE_PART" != "true" ]; then
>  		mkfs.$SD_PART2_FS ${SD_DEVICE}p2
> -		if [ 0 -lt "$SD_SWAP_SIZE" ]; then
> -			echo " * Formatting swap on ${SD_DEVICE}p3"
> -			mkswap ${SD_DEVICE}p3
> -		fi
> +		nextpart=3
> +	fi
> +	if [ 0 -lt "$SD_SWAP_SIZE" ]; then
> +		echo " * Formatting swap on ${SD_DEVICE}p${nextpart}"
> +		mkswap ${SD_DEVICE}p${nextpart}
>  	fi
>  
>  	echo "I: microSD card ready"
> --8<---------------cut here---------------end--------------->8---
>
> To be clear, I prefer your refactoring and from a quick view it seems
> correct.  However, I would like to perform some test installations
> before applying it, just to be sure everything is OK.

After some full installation tests, I applied it:

  http://git.debian.org/?p=pkg-fso/files.git;a=commitdiff;h=567e4c18fee3ba9ef8ce7863947366f17baf41b2

I also made a small modification to be more verbose:

  http://git.debian.org/?p=pkg-fso/files.git;a=commitdiff;h=7c924d8179fc8d413d3a898b327e5abb47f8f55f

Thx, bye,
Gismo / Luca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 314 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-fso-maint/attachments/20090618/b69bd77b/attachment.pgp>


More information about the pkg-fso-maint mailing list