diff options
-rwxr-xr-x | draklive | 6 | ||||
-rw-r--r-- | lib/MDV/Draklive/Media.pm | 2 |
2 files changed, 4 insertions, 4 deletions
@@ -97,7 +97,7 @@ sub build_syslinux_cfg { " kernel $kernel", " append initrd=$initrd $append $cmdline"; } - } group_by2('' => '', @{$media->{boot_entries}})), + } group_by2(@{$media->{boot_entries}}), "", ); } @@ -121,8 +121,6 @@ sub build_grub_cfg_raw { $media->{partitions}[$part_idx]{mntpoint} eq $boot and $boot = ""; my $title = $media->{title} || $live->{media}{title}; - my @boot_entries = @{$media->{boot_entries} || []}; - @boot_entries = ('' => '') if !@boot_entries; join("\n", "timeout " . get_bootloader_timeout($live), @@ -133,7 +131,7 @@ sub build_grub_cfg_raw { "title " . $title . if_($name, " ($name)"), "kernel $grub_part" . $boot . "/vmlinuz " . get_default_append($live, $opts) . if_($cmdline, " $cmdline"), if_($initrd, "initrd " . $boot . $initrd); - } group_by2(@boot_entries)), + } group_by2(@{$media->{boot_entries}}), ($live->{oem_rescue} && defined $opts->{oem_rescue_idx} ? ( #- FIXME: factorize with above, build_grub_cfg_entry($media) "title " . $live->{oem_rescue}{media}{title}, diff --git a/lib/MDV/Draklive/Media.pm b/lib/MDV/Draklive/Media.pm index 9f071d0..c891ef0 100644 --- a/lib/MDV/Draklive/Media.pm +++ b/lib/MDV/Draklive/Media.pm @@ -20,6 +20,8 @@ sub new { } } + $media->{boot_entries} ||= [ '' => '' ]; + $media; } |