summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-08-11 12:37:36 +0000
committerThierry Vignaud <tv@mandriva.org>2009-08-11 12:37:36 +0000
commitb7e70f713e4f3ac374820ef380f95892abbf50fc (patch)
treeb28e32e8a59030303001f0924993ad2f221c8d71 /perl-install/detect_devices.pm
parent453688ecb780aca59301900af21540fad3b283de (diff)
downloaddrakx-b7e70f713e4f3ac374820ef380f95892abbf50fc.tar
drakx-b7e70f713e4f3ac374820ef380f95892abbf50fc.tar.gz
drakx-b7e70f713e4f3ac374820ef380f95892abbf50fc.tar.bz2
drakx-b7e70f713e4f3ac374820ef380f95892abbf50fc.tar.xz
drakx-b7e70f713e4f3ac374820ef380f95892abbf50fc.zip
(dmidecode) fix parsing dmidecode output (broken since we use
dmidecode-2.10, aka since November 24 2008) Pixel: I hate you!
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 0c36dbfcc..8df493152 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -1019,7 +1019,10 @@ sub dmidecode() {
my ($ver, @l) = run_program::get_stdout('dmidecode');
my $tab = "\t";
- if ($ver =~ /(\d+\.\d+)/ && $1 >= 2.7) {
+
+ my ($major, $minor) = $ver =~ /(\d+)\.(\d+)/;
+
+ if ($major > 2 || $major == 2 && $minor >7) {
#- new dmidecode output is less indented
$tab = '';
#- drop header