From c6a9ad9d06312f3840fe3bd2c87668db43a017c5 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 31 Oct 2007 18:18:48 +0000 Subject: detect storage and various controllers before anything else (so that storage devices get detected at first boot on live) (backport from trunk) --- perl-install/NEWS | 2 + perl-install/harddrake/data.pm | 207 +++++++++++++++++++++-------------------- 2 files changed, 106 insertions(+), 103 deletions(-) diff --git a/perl-install/NEWS b/perl-install/NEWS index 1b226f5ff..f7b5d6391 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -6,6 +6,8 @@ - fix buttons order under KDE when using compiz (by detecting kde-window-decorator) - drakclock/finish-install: disable DPMS and screensaver when setting time, not to blank monitor (#17031) +- harddrake: detect storage and various controllers before anything else + (so that storage devices get detected at first boot on live) Version 10.4.239 - 5 October 2007, by Thierry Vignaud diff --git a/perl-install/harddrake/data.pm b/perl-install/harddrake/data.pm index 54f9eb588..3a8bdd6ba 100644 --- a/perl-install/harddrake/data.pm +++ b/perl-install/harddrake/data.pm @@ -58,6 +58,110 @@ my $modules_conf = modules::any_conf->read; # Format is (HW class ID, l18n class name, icon, config tool , is_to_be_detected_on_boot) our @tree = ( + { + class => "SATA_STORAGE", + string => N("SATA controllers"), + icon => "ide_hd.png", + configurator => "", + detector => sub { f(detect_devices::probe_category('disk/sata')) }, + checked_on_boot => 1, + }, + + { + class => "RAID_STORAGE", + string => N("RAID controllers"), + icon => "ide_hd.png", + configurator => "", + detector => sub { f(detect_devices::probe_category('disk/hardware_raid')), + f(grep { $_->{media_type} =~ /STORAGE_RAID/ } @devices) }, + checked_on_boot => 1, + }, + + { + class => "ATA_STORAGE", + string => N("(E)IDE/ATA controllers"), + icon => "ide_hd.png", + configurator => "", + detector => sub { f(detect_devices::probe_category('disk/ide')), + f(grep { $_->{media_type} =~ /STORAGE_(IDE|OTHER)/ } @devices) }, + checked_on_boot => 1, + }, + + { + class => "CARD_READER", + string => N("Card readers"), + icon => "ide_hd.png", + configurator => "", + detector => sub { f(detect_devices::probe_category('disk/card_reader')) }, + checked_on_boot => 1, + }, + + { + class => "FIREWIRE_CONTROLLER", + string => N("Firewire controllers"), + icon => "usb.png", + configurator => "", + detector => sub { f(grep { $_->{driver} =~ /ohci1394/ } @devices) }, + checked_on_boot => 1, + }, + + { + class => "PCMCIA_CONTROLLER", + string => N("PCMCIA controllers"), + icon => "hw-pcmcia.png", + configurator => "", + detector => sub { f(detect_devices::pcmcia_controller_probe()) }, + checked_on_boot => 1, + }, + + { + class => "SCSI_CONTROLLER", + string => N("SCSI controllers"), + icon => "scsi.png", + configurator => "", + detector => sub { f(detect_devices::probe_category('disk/scsi'), grep { $_->{media_type} =~ /STORAGE_SCSI/ } @devices) }, + checked_on_boot => 1, + }, + + { + class => "USB_CONTROLLER", + string => N("USB controllers"), + icon => "usb.png", + configurator => "", + detector => sub { f(grep { $_->{media_type} eq 'SERIAL_USB' } @devices) }, + checked_on_boot => 1, + }, + + { + class => "USB_HUB", + string => N("USB ports"), + icon => "hw-usb.png", + configurator => "", + detector => sub { f(grep { $_->{media_type} =~ /Hub/ } @devices) }, + checked_on_boot => 0, + }, + + { + class => "SMB_CONTROLLER", + string => N("SMBus controllers"), + icon => "hw-smbus.png", + configurator => "", + detector => sub { f(grep { $_->{media_type} =~ /SERIAL_SMBUS/ } @devices) }, + checked_on_boot => 0, + }, + + { + class => "BRIDGE", + string => N("Bridges and system controllers"), + icon => "memory.png", + configurator => "", + detector => sub { f(grep { $_->{media_type} =~ /BRIDGE|MEMORY_RAM|SYSTEM_OTHER|MEMORY_OTHER|SYSTEM_PIC/ + || $_->{description} =~ /Parallel Port Adapter/; + } @devices) }, + checked_on_boot => 0, + }, + + { class => "FLOPPY", string => N("Floppy"), @@ -362,109 +466,6 @@ our @tree = }, - { - class => "SATA_STORAGE", - string => N("SATA controllers"), - icon => "ide_hd.png", - configurator => "", - detector => sub { f(detect_devices::probe_category('disk/sata')) }, - checked_on_boot => 1, - }, - - { - class => "RAID_STORAGE", - string => N("RAID controllers"), - icon => "ide_hd.png", - configurator => "", - detector => sub { f(detect_devices::probe_category('disk/hardware_raid')), - f(grep { $_->{media_type} =~ /STORAGE_RAID/ } @devices) }, - checked_on_boot => 1, - }, - - { - class => "ATA_STORAGE", - string => N("(E)IDE/ATA controllers"), - icon => "ide_hd.png", - configurator => "", - detector => sub { f(detect_devices::probe_category('disk/ide')), - f(grep { $_->{media_type} =~ /STORAGE_(IDE|OTHER)/ } @devices) }, - checked_on_boot => 1, - }, - - { - class => "CARD_READER", - string => N("Card readers"), - icon => "ide_hd.png", - configurator => "", - detector => sub { f(detect_devices::probe_category('disk/card_reader')) }, - checked_on_boot => 1, - }, - - { - class => "FIREWIRE_CONTROLLER", - string => N("Firewire controllers"), - icon => "usb.png", - configurator => "", - detector => sub { f(grep { $_->{driver} =~ /ohci1394/ } @devices) }, - checked_on_boot => 1, - }, - - { - class => "PCMCIA_CONTROLLER", - string => N("PCMCIA controllers"), - icon => "hw-pcmcia.png", - configurator => "", - detector => sub { f(detect_devices::pcmcia_controller_probe()) }, - checked_on_boot => 1, - }, - - { - class => "SCSI_CONTROLLER", - string => N("SCSI controllers"), - icon => "scsi.png", - configurator => "", - detector => sub { f(detect_devices::probe_category('disk/scsi'), grep { $_->{media_type} =~ /STORAGE_SCSI/ } @devices) }, - checked_on_boot => 1, - }, - - { - class => "USB_CONTROLLER", - string => N("USB controllers"), - icon => "usb.png", - configurator => "", - detector => sub { f(grep { $_->{media_type} eq 'SERIAL_USB' } @devices) }, - checked_on_boot => 1, - }, - - { - class => "USB_HUB", - string => N("USB ports"), - icon => "hw-usb.png", - configurator => "", - detector => sub { f(grep { $_->{media_type} =~ /Hub/ } @devices) }, - checked_on_boot => 0, - }, - - { - class => "SMB_CONTROLLER", - string => N("SMBus controllers"), - icon => "hw-smbus.png", - configurator => "", - detector => sub { f(grep { $_->{media_type} =~ /SERIAL_SMBUS/ } @devices) }, - checked_on_boot => 0, - }, - - { - class => "BRIDGE", - string => N("Bridges and system controllers"), - icon => "memory.png", - configurator => "", - detector => sub { f(grep { $_->{media_type} =~ /BRIDGE|MEMORY_RAM|SYSTEM_OTHER|MEMORY_OTHER|SYSTEM_PIC/ - || $_->{description} =~ /Parallel Port Adapter/; - } @devices) }, - checked_on_boot => 0, - }, - { class => "KEYBOARD", string => N("Keyboard"), -- cgit v1.2.1