aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2004-03-19 14:03:14 +0000
committerFlorent Villard <warly@mandriva.com>2004-03-19 14:03:14 +0000
commitffbb24eec81c92f2ef605cadaaed3e91790a2a75 (patch)
treecc62baa90a20245172b138d30989d22c0c9110a4 /scripts
parentc608fce46b5875f1371f481215be589a52fbd6ec (diff)
downloadbootsplash-ffbb24eec81c92f2ef605cadaaed3e91790a2a75.tar
bootsplash-ffbb24eec81c92f2ef605cadaaed3e91790a2a75.tar.gz
bootsplash-ffbb24eec81c92f2ef605cadaaed3e91790a2a75.tar.bz2
bootsplash-ffbb24eec81c92f2ef605cadaaed3e91790a2a75.tar.xz
bootsplash-ffbb24eec81c92f2ef605cadaaed3e91790a2a75.zip
add Olivier Blin fixes to handle symbolic links into detec-resolution
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/detect-resolution8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/detect-resolution b/scripts/detect-resolution
index 7087665..3021f95 100755
--- a/scripts/detect-resolution
+++ b/scripts/detect-resolution
@@ -13,7 +13,7 @@ use strict;
my (%main, %entry, $vga, $initrd);
if ($ARGV[0]) {
- $initrd = $ARGV[0];
+ $initrd = -l $ARGV[0] ? readlink($ARGV[0]) : $ARGV[0];
$initrd =~ s,.*/,,
} else {
$vga = detect_from_cmdline(cat_('/proc/cmdline'));
@@ -65,6 +65,7 @@ sub parse_grub_conf {
$entry{$title}{vga} = $vga if ($title and $vga);
}
if (m,initrd\s+\(.*\)(?:.*/)?([^\s]+),){
+ #- TODO: support links
$entry{$title}{initrd} = $1;
$main{initrd}{$1} = $entry{$title}{vga}
}
@@ -83,7 +84,10 @@ sub parse_lilo_conf {
$main{vga} = $1 if m/^vga=(.*)/;
$vga = $1 if /vga=(.*)/;
$label = remove_quotes($1) if /label=(.*)/;
- $loc_initrd = $1 if m,initrd=(?:.*/)?(.*),;
+ if (/initrd=(.*)/) {
+ $loc_initrd = -l $1 ? readlink($1) : $1;
+ $loc_initrd =~ s,.*/,,;
+ }
$entry{$label}{vga} = $vga if ($label && $vga);
if (/image/) {
if ($loc_initrd && $label && $vga) {