diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/detect-resolution | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/detect-resolution b/scripts/detect-resolution index 9ea3519..6a777c1 100755 --- a/scripts/detect-resolution +++ b/scripts/detect-resolution @@ -9,7 +9,7 @@ # add better detection thanks to Olivier Blin idea to use argument from # make_boot_splash. -#use strict; +use strict; my (%main, %entry, $vga, $initrd); if ($ARGV[0]) { @@ -41,7 +41,6 @@ sub detect_from_loader { } $vga ||= $entry{$main{default}}{vga}; $vga ||= $main{vga} - print "VGA ($vga) main $main{vga} initrd $initrd ($main{initrd}{$initrd})\n"; } sub parse_grub_conf { my ($title); @@ -75,7 +74,7 @@ sub parse_grub_conf { sub parse_lilo_conf { my $lilo_conf="/etc/lilo.conf"; - my ($vga, $label); + my ($vga, $label, $loc_initrd); return if not -f $lilo_conf; open F, $lilo_conf or die "Can't open $lilo_conf\n"; while (<F>) { @@ -87,13 +86,13 @@ sub parse_lilo_conf { $loc_initrd = $1 if m,initrd=(?:.*/)?(.*),; $entry{$label}{vga} = $vga if ($label && $vga); if (/image/) { - undef $vga,$label; if ($loc_initrd && $label && $vga) { $entry{$label}{initrd} = $loc_initrd; if (!$main{initrd}{$loc_initrd} || $main{default} eq $label) { $main{initrd}{$loc_initrd} = $vga } } + undef $vga,$label; } } if ($loc_initrd && $label && $vga) { |