* Reduced some duplication in the partition plan output.

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 6 years ago
parent 702cb0f102
commit e4f9e5ae09
  1. 29
      scripts/plan_partitions

@ -11,6 +11,7 @@
# NOTE: This is restricted to what is available during an anaconda install session. That is to same, bare # NOTE: This is restricted to what is available during an anaconda install session. That is to same, bare
# minimum. # minimum.
# TODO: If multiple matching drives are found (same medium and size, build an appropriate RAID array. # TODO: If multiple matching drives are found (same medium and size, build an appropriate RAID array.
# TODO: in pre, wipefs on all disks to clear old LVM and DRBD data
# #
use strict; use strict;
@ -174,31 +175,25 @@ if (not $use_drive)
# Finally, we've got our output. # Finally, we've got our output.
my $partition_file = "/tmp/partition_plan"; my $partition_file = "/tmp/partition_plan";
my $partition_body = ""; my $partition_body = "zerombr
if ($type eq "striker")
{
$partition_body = "
zerombr
clearpart --all --drives=".$use_drive." clearpart --all --drives=".$use_drive."
ignoredisk --only-use=".$use_drive." ignoredisk --only-use=".$use_drive."
bootloader --location=mbr --driveorder=".$use_drive." bootloader --location=mbr --driveorder=".$use_drive." --boot-drive=".$use_drive."
part /boot --fstype ext4 --size=1024 --asprimary --ondisk=".$use_drive." part biosboot --fstype=biosboot --size=1
part swap --fstype swap --size=4096 --asprimary --ondisk=".$use_drive." part /boot --fstype=ext4 --size=1024 --asprimary --ondisk=".$use_drive."
part / --fstype ext4 --size=100 --asprimary --ondisk=".$use_drive." --grow part swap --fstype=swap --size=4096 --asprimary --ondisk=".$use_drive."
";
if ($type eq "striker")
{
$partition_body = "
part / --fstype xfs --size=100 --asprimary --ondisk=".$use_drive." --grow
"; ";
} }
else else
{ {
$partition_body = " $partition_body = "
zerombr part / --fstype xfs --size=100 --asprimary --ondisk=".$use_drive."
clearpart --all --drives=".$use_drive."
ignoredisk --only-use=".$use_drive."
bootloader --location=mbr --driveorder=".$use_drive."
part /boot --fstype ext4 --size=1024 --asprimary --ondisk=".$use_drive."
part swap --fstype swap --size=4096 --asprimary --ondisk=".$use_drive."
part / --fstype ext4 --size=100 --asprimary --ondisk=".$use_drive."
"; ";
} }

Loading…
Cancel
Save