summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/detect_devices.pm5
1 files changed, 3 insertions, 2 deletions
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;
}