diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-03-02 10:59:52 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-03-02 10:59:52 +0000 |
commit | 18f9fbaa0346e04f71f497fe18f4d1fc234e8989 (patch) | |
tree | 2b1abdca8037289919051d647f843b4bb3bc1c36 /perl-install | |
parent | 8d96a4a5f72671b54030f82c13aa4e88623e8b09 (diff) | |
download | drakx-18f9fbaa0346e04f71f497fe18f4d1fc234e8989.tar drakx-18f9fbaa0346e04f71f497fe18f4d1fc234e8989.tar.gz drakx-18f9fbaa0346e04f71f497fe18f4d1fc234e8989.tar.bz2 drakx-18f9fbaa0346e04f71f497fe18f4d1fc234e8989.tar.xz drakx-18f9fbaa0346e04f71f497fe18f4d1fc234e8989.zip |
if the default bootloader entry is invalid, choose another one
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/bootloader.pm | 6 |
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"; |