diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 261: minor corrections to lava-partition-disk

Message ID 20120322233016.4314.85662.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Paul Larson March 22, 2012, 11:30 p.m. UTC
Merge authors:
  Zygmunt Krynicki (zkrynicki)
Related merge proposals:
  https://code.launchpad.net/~zkrynicki/lava-dispatcher/update-daves-script/+merge/98908
  proposed by: Zygmunt Krynicki (zkrynicki)
  review: Approve - Michael Hudson-Doyle (mwhudson)
------------------------------------------------------------
revno: 261 [merge]
committer: Paul Larson <paul.larson@linaro.org>
branch nick: lava-dispatcher
timestamp: Thu 2012-03-22 18:28:21 -0500
message:
  minor corrections to lava-partition-disk
modified:
  doc/scripts/lava-partition-disk


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'doc/scripts/lava-partition-disk'
--- doc/scripts/lava-partition-disk	2012-03-07 10:39:25 +0000
+++ doc/scripts/lava-partition-disk	2012-03-19 12:18:42 +0000
@@ -2,57 +2,58 @@ 
 
 if [ "$1" = "" ]
 then
-        DEVICE="/dev/sdb"
+    echo "Usage: $0 DEVICE"
+    exit 1
 else
-        DEVICE=$1
+    DEVICE=$1
 fi
 
 if [ "$2" = "" ]
 then
-# SIZE is the size of the testrootfs partition. On an 8G sd you can fit
-# 4G - put it up to 8G on a 16GB. The rest is allocated to sdcard for
-# android
-        SIZE="4G"
+    # SIZE is the size of the testrootfs partition. On an 8G sd you can fit
+    # 4G - put it up to 8G on a 16GB. The rest is allocated to sdcard for
+    # android
+    SIZE="4G"
 else
-        SIZE=$2
+    SIZE=$2
 fi
 
 if [ "$3" = "" ]
 then
-        SCHEME="2part"
+    SCHEME="2part"
 else
-        SCHEME=$3
+    SCHEME=$3
 fi
 
 # origen has a different original layout with 3 partitions - all others are the same (so far)
 
 if [ $SCHEME = "2part" ]
 then
-	TESTBOOT_PART=3
-	TESTROOTFS_PART=5
-	SDCARD_PART=6
-	LAST_BLOCK=2
+    TESTBOOT_PART=3
+    TESTROOTFS_PART=5
+    SDCARD_PART=6
+    LAST_BLOCK=2
 else
-	TESTBOOT_PART=5
-	TESTROOTFS_PART=6
-	SDCARD_PART=7
-	LAST_BLOCK=3
+    TESTBOOT_PART=5
+    TESTROOTFS_PART=6
+    SDCARD_PART=7
+    LAST_BLOCK=3
 fi
 
 FIRST_BLOCK_START=`sudo fdisk -S 63 -H 255 -lc $DEVICE | grep "$DEVICE$LAST_BLOCK" | awk '{print $3 + 1}'`
 
 if [ "$FIRST_BLOCK_START" = "" ]
 then
-	echo "Device specification error: $DEVICE"
-	exit 1
+    echo "Device specification error: $DEVICE"
+    exit 1
 fi
 
 if [ $SCHEME = "2part" ]
 then
-	EXTENDED_BLOCK_START=`echo $FIRST_BLOCK_START | awk '{print $1 + 131072}'`
-	FDISK_SCRIPT="n\np\n3\n$FIRST_BLOCK_START\n+64M\nt\n3\nc\nn\ne\n$EXTENDED_BLOCK_START\n\nn\n\n+$SIZE\nn\n\n\nt\n6\nc\np\nw\n"
+    EXTENDED_BLOCK_START=`echo $FIRST_BLOCK_START | awk '{print $1 + 131072}'`
+    FDISK_SCRIPT="n\np\n3\n$FIRST_BLOCK_START\n+64M\nt\n3\nc\nn\ne\n$EXTENDED_BLOCK_START\n\nn\n\n+$SIZE\nn\n\n\nt\n6\nc\np\nw\n"
 else
-	FDISK_SCRIPT="n\ne\n$FIRST_BLOCK_START\n\nn\n\n+64M\nt\n5\nc\nn\n\n+$SIZE\nn\n\n\nt\n7\nc\np\nw\n"
+    FDISK_SCRIPT="n\ne\n$FIRST_BLOCK_START\n\nn\n\n+64M\nt\n5\nc\nn\n\n+$SIZE\nn\n\n\nt\n7\nc\np\nw\n"
 fi
 
 echo -e $FDISK_SCRIPT | sudo fdisk -S 63 -H 255 -c $DEVICE