[pkg-fso-commits] [SCM] Various non-packaged files branch, master, updated. fbcc696c651387637f16b277be5d4b6aad36edd0
Steffen Moeller
steffen_moeller at gmx.de
Thu Feb 19 23:43:45 UTC 2009
The following commit has been merged in the master branch:
commit 69908ccc449d61ab43f74326b60375b86f00d85b
Author: Steffen Moeller <steffen_moeller at gmx.de>
Date: Tue Feb 17 18:41:07 2009 +0100
Verified single part to work.
diff --git a/install.sh b/install.sh
index d28b56b..9e109af 100755
--- a/install.sh
+++ b/install.sh
@@ -452,80 +452,79 @@ bootfstypeno=83
mb=$(echo pq | fdisk /dev/mmcblk0 | grep Disk| cut -f 3 -d \ )
cylinders=$(echo pq | fdisk /dev/mmcblk0 | grep cylinders|grep heads|cut -f 5 -d\ )
+lastcylinder=$(($cylinders-($cylinders*$SD_SWAP_SIZE/$mb)))
if [ "vfat" = "$SD_PART1_FS" ]; then
bootfstypeno=4
fi
+partitionno=0
if [ "$SINGLE_PART" = "true" ]; then
echo "Preparing SD as a single Linux device."
- fdisk $SD_DEVICE <<__END__
+ partitionno=$(($partitionno+1))
+ cat <<EOSINGLECONF > /tmp/argsToFdisk$$
n
p
-1
+$partitionno
-
-w
-__END__
-
- if [ -n "$SD_SWAP_SIZE" ]; then
- echo "Preparation of swap partition is not supported for single part setups."
- fi
+$lastcylinder
+EOSINGLECONF
else
+ partitionno=$(($partitionno+1))
cat <<EOBOOTCONF > /tmp/argsToFdisk$$
n
p
-1
+$partitionno
+${SD_PART1_SIZE}M
t
$bootfstypeno
EOBOOTCONF
- lastcylinder=$(($cylinders-($cylinders*$SD_SWAP_SIZE/$mb)))
+ partitionno=$(($partitionno+1))
cat <<EOROOTCONF >> /tmp/argsToFdisk$$
n
p
-2
+$partitionno
$lastcylinder
t
-2
+$partitionno
83
EOROOTCONF
+fi
- if [ 0 -lt "$SD_SWAP_SIZE" ]; then
- cat <<EOSWAPCONF >> /tmp/argsToFdisk$$
+if [ 0 -lt "$SD_SWAP_SIZE" ]; then
+ partitionno=$(($partitionno+1))
+ cat <<EOSWAPCONF >> /tmp/argsToFdisk$$
n
p
-3
+$partitionno
t
-3
+$partitionno
82
p
EOSWAPCONF
+fi
echo "w" >> /tmp/argsToFdisk$$
+if fdisk $SD_DEVICE < /tmp/argsToFdisk$$; then
+ echo "Partitioning was successful."
+ if [ -n "$verbose" ]; then
+ echo "The following partitions have been created:"
+ echo "pq" | fdisk $SD_DEVICE
fi
-
- if fdisk $SD_DEVICE < /tmp/argsToFdisk$$; then
- echo "Partitioning was successful."
- if [ -n "$verbose" ]; then
- echo "The following partitions have been created:"
- echo "pq" | fdisk $SD_DEVICE
- fi
- #rm /tmp/argsToFdisk$$
- else
- echo "Partitioning failed, could not execute with fdisk:"
- cat /tmp/argsToFdisk$$
- exit -1
- fi
-
+ #rm /tmp/argsToFdisk$$
+else
+ echo "Partitioning failed, could not execute with fdisk:"
+ cat /tmp/argsToFdisk$$
+ exit -1
fi
+
echo " * Waiting for partitions to appear"
SLEEP_SECONDS=3
if [ "$SINGLE_PART" = "true" ]; then
--
Various non-packaged files
More information about the pkg-fso-commits
mailing list