summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-02-17 13:25:11 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-02-17 13:25:11 +0000
commitc3047f667361d9f7726a996c2363cf8fd77e461e (patch)
tree371bd77393dea099a5f03e9a2c5fb2bd9fc2f47b /perl-install/install_any.pm
parentf2242e8ab84506cad5759294bf165fa8cc72a1da (diff)
downloaddrakx-c3047f667361d9f7726a996c2363cf8fd77e461e.tar
drakx-c3047f667361d9f7726a996c2363cf8fd77e461e.tar.gz
drakx-c3047f667361d9f7726a996c2363cf8fd77e461e.tar.bz2
drakx-c3047f667361d9f7726a996c2363cf8fd77e461e.tar.xz
drakx-c3047f667361d9f7726a996c2363cf8fd77e461e.zip
- create dmidecode_category()
- don't use field {string} when not needed - better use regexps on dmidecode returned strings (even the kernel use strstr)
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index a0fe63c67..d19e61472 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -737,16 +737,17 @@ sub default_packages {
push @l, "mdadm" if !is_empty_array_ref($o->{all_hds}{raids});
push @l, "lvm2" if !is_empty_array_ref($o->{all_hds}{lvms});
push @l, "alsa", "alsa-utils" if any { $o->{modules_conf}->get_alias("sound-slot-$_") =~ /^snd-/ } 0 .. 4;
- my %dmi = map { $_->{name} => $_ } detect_devices::dmidecode();
- if ($dmi{System}{Manufacturer} eq "Dell Computer" && member($dmi{System}{'Product Name'}, qw(Inspiron Latitude))) {
+ my $dmi_System = detect_devices::dmidecode_category('System');
+ my $dmi_BIOS = detect_devices::dmidecode_category('BIOS');
+ if ($dmi_System->{Manufacturer} =~ /Dell Computer/ && $dmi_System->{'Product Name'} =~ /Inspiron|Latitude/) {
modules::append_to_modules_loaded_at_startup_for_all_kernels('i8k');
push @l, "i8kutils";
}
- if ($dmi{System}{Manufacturer} eq 'TOSHIBA' && $dmi{BIOS}{Vendor} eq 'TOSHIBA') {
+ if ($dmi_System->{Manufacturer} =~ /TOSHIBA/ && $dmi_BIOS->{Vendor} =~ /TOSHIBA/) {
modules::append_to_modules_loaded_at_startup_for_all_kernels('toshiba');
push @l, "toshutils";
}
- if ($dmi{BIOS}{Vendor} eq 'COMPAL' && $dmi{BIOS}{Characteristics} =~ /Function key-initiated network boot is supported/) {
+ if ($dmi_BIOS->{Vendor} eq 'COMPAL' && $dmi_BIOS->{Characteristics} =~ /Function key-initiated network boot is supported/) {
modules::append_to_modules_loaded_at_startup_for_all_kernels('acerhk');
}