diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-03-19 18:56:29 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-03-19 18:56:29 +0000 |
commit | a0d98620fca280b3b27250beb5c5effa78c0ded6 (patch) | |
tree | b51f4103013b105c3de19ab9da89955bde0e3f82 /perl-install/standalone/bootloader-config | |
parent | 1107715d6a42562eb1e901e2abedf5c02af0b6ab (diff) | |
download | drakx-a0d98620fca280b3b27250beb5c5effa78c0ded6.tar drakx-a0d98620fca280b3b27250beb5c5effa78c0ded6.tar.gz drakx-a0d98620fca280b3b27250beb5c5effa78c0ded6.tar.bz2 drakx-a0d98620fca280b3b27250beb5c5effa78c0ded6.tar.xz drakx-a0d98620fca280b3b27250beb5c5effa78c0ded6.zip |
simplify horrible code
I let ARM maintainer decides if the following is better:
$image = find { -e $_ } map { "/boot/$_-$kernel_version" } if_(arch() =~ /arm/ && $kernel_version =~ /versatile/, 'uImage'), qw(vmlinux vmlinuz);
Diffstat (limited to 'perl-install/standalone/bootloader-config')
-rwxr-xr-x | perl-install/standalone/bootloader-config | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/perl-install/standalone/bootloader-config b/perl-install/standalone/bootloader-config index 99bc5409e..6af70b48d 100755 --- a/perl-install/standalone/bootloader-config +++ b/perl-install/standalone/bootloader-config @@ -54,19 +54,7 @@ if ($image) { } $image = "/boot/$image" if $image !~ m!^/!; } elsif ($kernel_version) { - # FIXME : test for vmlinux or vmlinuz existence and choose - # instead of using arch() - if (arch() =~ /mips/) { - $image = "/boot/vmlinux-$kernel_version"; - } elsif (arch() =~ /arm/) { - if ($kernel_version =~ /versatile/) { - $image = "/boot/vmlinuz-$kernel_version"; - } else { - $image = "/boot/uImage-$kernel_version"; - } - } else { - $image = "/boot/vmlinuz-$kernel_version"; - } + $image = find { -e $_ } map { "/boot/$_-$kernel_version" } qw(vmlinux uImage vmlinuz); } |