summaryrefslogtreecommitdiffstats
path: root/lib/MGA/DrakISO/BuildBoot.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MGA/DrakISO/BuildBoot.pm')
-rw-r--r--lib/MGA/DrakISO/BuildBoot.pm13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/MGA/DrakISO/BuildBoot.pm b/lib/MGA/DrakISO/BuildBoot.pm
index 69d989c..9336f9e 100644
--- a/lib/MGA/DrakISO/BuildBoot.pm
+++ b/lib/MGA/DrakISO/BuildBoot.pm
@@ -29,7 +29,6 @@ package MGA::DrakISO::BuildBoot;
use strict;
use MDK::Common;
-use common;
use File::Copy qw(mv);
use Try::Tiny;
@@ -212,7 +211,7 @@ sub prepare_iso_bootloader {
output($grub2_cfg, build_grub2_cfg($build, $theme_name, \@theme_fonts, $add_lang_menu, $add_kbd_menu));
}
- my $title = $build->{media}{bootloader_title} // $label =~ s/-/ /gr;
+ my $title = $build->{media}{bootloader_title} || $label =~ s/-/ /gr;
my $mode = $arch eq 'x86_64' ? '64-bit' : '32-bit';
# If we have a theme, replace the menu title with the name of the ISO
@@ -222,7 +221,7 @@ sub prepare_iso_bootloader {
run_('sed', '-i', qq(s/title-text:.*/title-text: "$title ($mode)"/), $base_theme_txt);
}
- my $efi_type = $build->{media}{efi_type} // 'none';
+ my $efi_type = $build->{media}{efi_type} || 'none';
member($efi_type, qw(none 32bit 64bit all)) or die "ERROR: unrecognised EFI type '$efi_type'\n";
# If we are building a legacy-boot only ISO, we are done.
@@ -365,9 +364,9 @@ sub build_grub2_cfg {
),
(map {
my ($name, $options) = @$_;
- my $command = $options->{command} // 'linux';
- my $image = $options->{image} // get_default_image($build, $name);
- my $initrd = $options->{initrd} // get_default_initrd($build);
+ my $command = $options->{command} || 'linux';
+ my $image = $options->{image} || get_default_image($build, $name);
+ my $initrd = $options->{initrd} || get_default_initrd($build);
my $append = $options->{append};
my $initrd_command = $command eq 'linux16 ' ? 'initrd16' : 'initrd';
@@ -378,7 +377,7 @@ sub build_grub2_cfg {
),
"menuentry $gettext\"$name\" {",
" $command $image " . join(' ', get_default_append($build), $append),
- if_($initrd,
+ if_($initrd ne 'none',
" $initrd_command $initrd",
),
"}",