Map partition ID's from sgdisk to lowercase

This commit is contained in:
Marcus Schäfer 2017-05-18 14:42:14 +02:00
parent 8c7e78ebf8
commit 0c4ebf657e
No known key found for this signature in database
GPG Key ID: AD11DD02B44996EF

View File

@ -4498,7 +4498,8 @@ function partedGetPartitionID {
local name=$(parted -m -s $1 print | grep ^$2: | cut -f6 -d:)
if lookup sgdisk &>/dev/null;then
# map to short gdisk code
echo $(sgdisk -p $1 | grep -E "^ $2") | cut -f6 -d ' ' | cut -c-2
echo $(sgdisk -p $1 | grep -E "^ $2") |\
cut -f6 -d ' ' | cut -c-2 | tr [:upper:] [:lower:]
elif [ "$name" = "lxroot" ];then
# map lxroot to MBR type 83 (linux)
echo 83