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 | 95ebfe4f6f18b8a24f9e519ba4046e6b496997f7 (patch) | |
tree | b51f4103013b105c3de19ab9da89955bde0e3f82 /perl-install/standalone/bootloader-config | |
parent | 305e43853e0c3d9b6c63e10a28ab1c2f9d85c4e2 (diff) | |
download | drakx-backup-do-not-use-95ebfe4f6f18b8a24f9e519ba4046e6b496997f7.tar drakx-backup-do-not-use-95ebfe4f6f18b8a24f9e519ba4046e6b496997f7.tar.gz drakx-backup-do-not-use-95ebfe4f6f18b8a24f9e519ba4046e6b496997f7.tar.bz2 drakx-backup-do-not-use-95ebfe4f6f18b8a24f9e519ba4046e6b496997f7.tar.xz drakx-backup-do-not-use-95ebfe4f6f18b8a24f9e519ba4046e6b496997f7.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); } |