From bb612c87e63aacd91d1140865fe88e9028ae0b13 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 11 Jan 2005 19:41:23 +0000 Subject: (dmidecode) do not rerun dmidecode on machines that do not support it --- perl-install/detect_devices.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'perl-install/detect_devices.pm') diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 4eb555a8c..9b058f525 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -791,11 +791,11 @@ sub hasSMP() { } sub hasPCMCIA() { $::o->{pcmcia} } #- because /proc/pcmcia seems not to be present on 2.4 at least (or use /var/run/stab) -my @dmis; +my (@dmis, $dmidecode_already_runned); # we return a list b/c several DMIs have the same name: sub dmidecode() { - return @dmis if @dmis; + return @dmis if $dmidecode_already_runned; foreach (run_program::get_stdout('dmidecode')) { if (/^\t\t(.*)/) { @@ -807,6 +807,7 @@ sub dmidecode() { push @dmis, { name => $s }; } } + $dmidecode_already_runned = 1; @dmis; } -- cgit v1.2.1