summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-01-11 19:41:23 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-01-11 19:41:23 +0000
commitbb612c87e63aacd91d1140865fe88e9028ae0b13 (patch)
tree096672cc56e32835bab8867822030f9ae41dee85 /perl-install/detect_devices.pm
parent62aacf365cfd1c466f9fb253d21d02979d7d8610 (diff)
downloaddrakx-backup-do-not-use-bb612c87e63aacd91d1140865fe88e9028ae0b13.tar
drakx-backup-do-not-use-bb612c87e63aacd91d1140865fe88e9028ae0b13.tar.gz
drakx-backup-do-not-use-bb612c87e63aacd91d1140865fe88e9028ae0b13.tar.bz2
drakx-backup-do-not-use-bb612c87e63aacd91d1140865fe88e9028ae0b13.tar.xz
drakx-backup-do-not-use-bb612c87e63aacd91d1140865fe88e9028ae0b13.zip
(dmidecode) do not rerun dmidecode on machines that do not support it
Diffstat (limited to 'perl-install/detect_devices.pm')
-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;
}