diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2013-03-08 14:01:45 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-10 04:36:50 +0000 |
commit | 5848c5c745c3e7c9b143323f99fd1feb0a7f3ccb (patch) | |
tree | 510f9909a52abf34cc5e0ecfd2b1755976d637ba /scripts/contrib/mkefidisk.sh | |
parent | 5ecdb3edba8238661815ca5d90b05215f06f4249 (diff) | |
download | poky-5848c5c745c3e7c9b143323f99fd1feb0a7f3ccb.tar.gz |
mkefidisk.sh: Cope with translations and modelnames with 'Disk' in it.
The script greps for 'Disk', which doesn't work when your crazy Dutch distro has parted call it 'Schijf', so force LANG=C.
The second problem is that 'Disk' might be a substring in the Model entry:
[root@Angstrom-F16-vm-rpm contrib] # parted /dev/sdc unit mb print
Model: SanDisk SDDR-113 (scsi)
Disk /dev/sdc: 3905MB
(From OE-Core rev: 2e404930f6fc7d818d2f429793e84bce77163afd)
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib/mkefidisk.sh')
-rwxr-xr-x | scripts/contrib/mkefidisk.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh index 38e22176e3..44ac130a68 100755 --- a/scripts/contrib/mkefidisk.sh +++ b/scripts/contrib/mkefidisk.sh | |||
@@ -18,6 +18,8 @@ | |||
18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | # | 19 | # |
20 | 20 | ||
21 | LANG=C | ||
22 | |||
21 | # | 23 | # |
22 | # Defaults | 24 | # Defaults |
23 | # | 25 | # |
@@ -123,7 +125,7 @@ fi | |||
123 | # | 125 | # |
124 | # Partition $DEVICE | 126 | # Partition $DEVICE |
125 | # | 127 | # |
126 | DEVICE_SIZE=$(parted $DEVICE unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//") | 128 | DEVICE_SIZE=$(parted $DEVICE unit mb print | grep ^Disk | cut -d" " -f 3 | sed -e "s/MB//") |
127 | SWAP_SIZE=$((DEVICE_SIZE*SWAP_RATIO/100)) | 129 | SWAP_SIZE=$((DEVICE_SIZE*SWAP_RATIO/100)) |
128 | ROOTFS_SIZE=$((DEVICE_SIZE-BOOT_SIZE-SWAP_SIZE)) | 130 | ROOTFS_SIZE=$((DEVICE_SIZE-BOOT_SIZE-SWAP_SIZE)) |
129 | ROOTFS_START=$((BOOT_SIZE)) | 131 | ROOTFS_START=$((BOOT_SIZE)) |