29 |
local command="$1" |
local command="$1" |
30 |
local given_partition="$2" |
local given_partition="$2" |
31 |
|
|
|
# |
|
|
#--overwrite |
|
|
|
|
32 |
for i in ${PARTITION_DISK_SETUP} |
for i in ${PARTITION_DISK_SETUP} |
33 |
do |
do |
34 |
partition=$(echo ${i} | cut -d: -f1) |
partition=$(echo ${i} | cut -d: -f1) |
57 |
|
|
58 |
echo "${disk}|${disk}" |
echo "${disk}|${disk}" |
59 |
|
|
|
# while read partition size id boot |
|
60 |
while read partition blurb |
while read partition blurb |
61 |
do |
do |
62 |
# size |
# size |
65 |
fstype="$(mount -f --guess-fstype ${partition})" |
fstype="$(mount -f --guess-fstype ${partition})" |
66 |
# bootable flag |
# bootable flag |
67 |
boot="$(fdisk -l ${disk} | grep ${partition} | grep \* | sed 's/.*\(*\).*/b/')" |
boot="$(fdisk -l ${disk} | grep ${partition} | grep \* | sed 's/.*\(*\).*/b/')" |
68 |
# # swap |
# mountpoint, but detect any swap |
69 |
# if [[ ${id} = 82 ]] |
mountpoint="$(query_partition_disk_setup --mountpoint ${partition})" |
70 |
# then |
# filesystem to format |
71 |
# mountpoint="swap" |
format="$(query_partition_disk_setup --filesystem ${partition})" |
|
# format="swap" |
|
|
# export PARTITION_DISK_SETUP="${PARTITION_DISK_SETUP} ${disk}:swap:swap" |
|
|
# else |
|
|
# mountpoint, but detect any swap |
|
|
mountpoint="$(query_partition_disk_setup --mountpoint ${partition})" |
|
|
# filesystem to format |
|
|
format="$(query_partition_disk_setup --filesystem ${partition})" |
|
|
# fi |
|
72 |
|
|
73 |
# do not print unkown disk with a size of 1 |
# do not print unkown disk with a size of 1 |
74 |
# these disks are containers for secondary partition types |
# these disks are containers for secondary partition types |