Skip to content
Snippets Groups Projects
Verified Commit 5b6dfccc authored by Johannes Schauer Marin Rodrigues's avatar Johannes Schauer Marin Rodrigues
Browse files

sbin/reform-flash-uboot: run parted with --script

Thanks: deianara
parent f1d84dc9
No related branches found
No related tags found
No related merge requests found
......@@ -135,7 +135,7 @@ fi
partprobe "/dev/$DEV_MMC"
# resize the second partition to fill the emmc
parted "/dev/$DEV_MMC" resizepart 2 100%
parted --script --machine "/dev/$DEV_MMC" resizepart 2 100%
partprobe "/dev/$DEV_MMC"
sync
......
......@@ -134,11 +134,11 @@ for dev in "$@"; do
fi
# no further tests for disks without a partition table
if [ "$(parted --machine "$dev" unit B print 2>/dev/null | grep "^$dev:" | cut -d: -f 6)" = unknown ]; then
if [ "$(parted --script --machine "$dev" unit B print 2>/dev/null | grep "^$dev:" | cut -d: -f 6)" = unknown ]; then
continue
fi
freeuntil=$(parted --machine "$dev" unit B print free | grep --max-count=1 '^1:1024B:.*:free;')
freeuntil=$(parted --script --machine "$dev" unit B print free | grep --max-count=1 '^1:1024B:.*:free;')
freeuntil=${freeuntil##1:1024B:}
freeuntil=${freeuntil%B:*:free;}
# The following checks whether the parsed output is a valid integer.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment