summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2014-12-07 10:34:25 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2014-12-07 10:35:54 +0100
commit11aef71ed8eaaf0764bfba2808009e6748c289ca (patch)
treeadaf50754ab4b1b6ddb6c61b7d147ccd287a00e3 /perl-install
parentfd487131075c440db1e96eaf72194c8e2eb17bfc (diff)
downloaddrakx-11aef71ed8eaaf0764bfba2808009e6748c289ca.tar
drakx-11aef71ed8eaaf0764bfba2808009e6748c289ca.tar.gz
drakx-11aef71ed8eaaf0764bfba2808009e6748c289ca.tar.bz2
drakx-11aef71ed8eaaf0764bfba2808009e6748c289ca.tar.xz
drakx-11aef71ed8eaaf0764bfba2808009e6748c289ca.zip
drop support for dmidecode < 2.7
(which we have since January 2006, mdv2007.0...)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/detect_devices.pm16
1 files changed, 5 insertions, 11 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index deac44714..c29bb6a27 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -1269,23 +1269,17 @@ sub dmidecode() {
return if $>;
my ($ver, @l) = arch() =~ /86/ ? run_program::get_stdout('dmidecode') : ();
- my $tab = "\t";
-
my ($major, $minor) = $ver =~ /(\d+)\.(\d+)/;
- if ($major > 2 || $major == 2 && $minor > 7) {
- #- new dmidecode output is less indented
- $tab = '';
- #- drop header
- shift @l while @l && $l[0] ne "\n";
- }
+ #- drop header
+ shift @l while @l && $l[0] ne "\n";
foreach (@l) {
next if /TRUNCATED/;
- if (/^$tab\t(.*)/) {
+ if (/^\t(.*)/) {
$dmis[-1]{string} .= "$1\n";
- $dmis[-1]{$1} = $2 if /^$tab\t(.*): (.*)$/;
- } elsif (my ($s) = /^$tab(.*)/) {
+ $dmis[-1]{$1} = $2 if /^\t(.*): (.*)$/;
+ } elsif (my ($s) = /^(.*)/) {
next if $s =~ /^$/ || $s =~ /\bDMI type \d+/;
$s =~ s/ Information$//;
push @dmis, { name => $s };