Fix typo that pulls in the whole string in awk.

This commit is contained in:
Chris Stackpole 2021-07-13 23:16:53 -05:00
parent eb0c36e9e8
commit ce081d8e0a
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ kpartx -av "${image}"
# Get the loop partition; it might be loop0p3, loop1p3, ...
looppart=$(kpartx -l "${image}" | awk '/p3/{print $1}')
# Get the UUID of our root partition (the ext4 one) (UUID=e3984938429 , strip out quotes("), and force upper case)
partuuid=$(blkid | grep "mapper/${looppart}" | head -1 | awk '{gsub(/\"/,"", $NF); print toupper($0)}')
partuuid=$(blkid | grep "mapper/${looppart}" | head -1 | awk '{gsub(/\"/,"", $NF); print toupper($NF)}')
# Mount the /boot partition (swap the 3rd partition for the first):
umount /mnt/tmp