Skip to content
Permalink
Browse files

Change boot flag check to properly find the correct partition instead…

… of grepping the whole output for flags which has caused issues when two or more partitions have the same flag set
  • Loading branch information...
Sebastian-Roth committed Mar 12, 2019
1 parent f49b0f7 commit 693a4f74d81fad5eba09799768c53f25b7c50e3c
Showing with 3 additions and 2 deletions.
  1. +3 −2 Buildroot/board/FOG/FOS/rootfs_overlay/bin/fog.upload
@@ -105,8 +105,9 @@ beginUpload() {
;;
esac
umount /bcdstore >/dev/null 2>&1
if [[ $partscnt -gt 1 ]]; then
if [[ $(parted -l "$hd" | grep boot | awk '{print $1}') -eq $part_number || $(parted -l "$hd" | grep msftres | awk '{print $1}') -eq $part_number || $(parted -l "$hd" | grep hidden | awk '{print $1}') -eq $part_number ]]; then
if [[ $partscnt -gt 1 ]]; then
parted -l "$hd" | grep "^ *${part_number} " | grep -q "boot\|msftres\|hidden"
if [[ $? -eq 0 ]]; then
echo " * New fixed partition for ($part) added."
fixed_size_partitions="$fixed_size_partitions:$part_number"
fi

0 comments on commit 693a4f7

Please sign in to comment.
You can’t perform that action at this time.