summaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorAndreas Loibl <andreas@andreas-loibl.de>2011-09-15 03:20:28 +0200
committerAndreas Loibl <andreas@andreas-loibl.de>2011-09-15 03:20:28 +0200
commit9f9f608a5b8951c88f7662641816997495a90b88 (patch)
tree8e2ecef4015809914353621fb5207f5c5eed7bdb /backend
parente06453b21ffe339ea8e44825dbfce0555b15e494 (diff)
downloadacritoxinstaller-9f9f608a5b8951c88f7662641816997495a90b88.zip
acritoxinstaller-9f9f608a5b8951c88f7662641816997495a90b88.tar.gz
add GPT support
Diffstat (limited to 'backend')
-rw-r--r--backend/modules/partitions24
1 files changed, 22 insertions, 2 deletions
diff --git a/backend/modules/partitions b/backend/modules/partitions
index 53e4219..a42333e 100644
--- a/backend/modules/partitions
+++ b/backend/modules/partitions
@@ -133,10 +133,20 @@ function list_partitions()
# /dev/sdb1
function list_linux_partitions()
{
+ (
for disk in $(list_all_disks)
do
LC_ALL=C sfdisk -l "$disk" 2>/dev/null | sed 's/[*+]//g;' | gawk '/^\/dev/{if($6 == 83){print $1}}'
done
+ for part in $(list_all_partitions)
+ do
+ case "$(blkid -p -s PART_ENTRY_TYPE -o value "$part")" in
+ 0x83|ebd0a0a2-b9e5-4433-87c0-68b6b72699c7)
+ echo "$part"
+ ;;
+ esac
+ done
+ ) | sort -u
}
# Synopsis: list_swap_partitions
@@ -147,10 +157,20 @@ function list_linux_partitions()
# /dev/sdb1
function list_swap_partitions()
{
+ (
for disk in $(list_all_disks)
do
LC_ALL=C sfdisk -l "$disk" 2>/dev/null | sed 's/[*+]//g;' | gawk '/^\/dev/{if($6 == 82){print $1}}'
done
+ for part in $(list_all_partitions)
+ do
+ case "$(blkid -p -s PART_ENTRY_TYPE -o value "$part")" in
+ 0x82|0657fd6d-a4ab-43c4-84e5-0933c84b4f4f)
+ echo "$part"
+ ;;
+ esac
+ done
+ ) | sort -u
}
# Synopsis: get_disk <partition>
@@ -217,7 +237,7 @@ function send_possible_root_partitions()
function send_possible_root_filesystems()
{
send data possible_root_filesystems
- for fs in ext4 ext3 reiserfs xfs jfs; do echo $fs; done
+ for fs in ext4 ext3 reiserfs btrfs xfs jfs; do echo $fs; done
}
# Synopsis: get_filesystem <device>
@@ -250,7 +270,7 @@ function get_filesystem_type()
filesystem="$(get_filesystem "$1")"
fi
case $filesystem in
- ext4|ext3|ext2|reiserfs|xfs|minix|hfs|efs|reiser4|jfs) echo Linux;;
+ ext4|ext3|ext2|reiserfs|xfs|minix|hfs|efs|reiser4|jfs|btrfs) echo Linux;;
iso9660) echo CD-ROM;;
vfat|ntfs) echo Windows;;
swap) echo Swap;;