From 18f9fbaa0346e04f71f497fe18f4d1fc234e8989 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 2 Mar 2004 10:59:52 +0000 Subject: if the default bootloader entry is invalid, choose another one --- perl-install/bootloader.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'perl-install/bootloader.pm') 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"; -- cgit v1.2.1