summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 6622247d1..869c48737 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -950,7 +950,11 @@ sub write_lilo_conf {
#- normalize: RESTRICTED is only valid if PASSWORD is set
delete $bootloader->{restricted} if !$bootloader->{password};
-
+
+ if (every { $_->{label} ne $bootloader->{default} } @{$bootloader->{entries}}) {
+ log::l("default bootloader entry $bootloader->{default} is invalid, choose another one");
+ $bootloader->{default} = $bootloader->{entries}[0]{label};
+ }
local $bootloader->{default} = make_label_lilo_compatible($bootloader->{default});
print $F "# File generated by DrakX/drakboot";
print $F "# WARNING: do not forget to run lilo after modifying this file\n";