Commit 62e1a144 authored by Colin Watson's avatar Colin Watson

don't default to logical if an extended partition already exists, only if a...

don't default to logical if an extended partition already exists, only if a real primary partition exists

r61054
parent 5fb833a0
......@@ -67,15 +67,12 @@ ask_for_size () {
}
ask_for_type () {
local noninteractive has_extended parttype
local noninteractive has_primary parttype
has_primary=no
has_extended=no
open_dialog PARTITIONS
while { read_line x1 x2 x3 parttype x5 x6 x7; [ "$parttype" ]; }; do
if [ "$parttype" = primary ]; then
has_primary=yes
elif [ "$parttype" = logical ]; then
has_extended=yes
fi
done
close_dialog
......@@ -92,7 +89,7 @@ ask_for_type () {
type=Logical
;;
pri/log)
if [ "$has_primary" = yes ] || [ "$has_extended" = yes ]; then
if [ "$has_primary" = yes ]; then
db_set partman-partitioning/new_partition_type Logical
else
db_set partman-partitioning/new_partition_type Primary
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment