diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-10-04 07:20:50 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-10-04 07:20:50 +0000 |
commit | 237ff88644c53046c933f6aaf18de8bc5515cb0d (patch) | |
tree | 97a07809bd5b31e06c3f69305c2c9ca6530eaeae /perl-install | |
parent | f9131c2782dd935e55fd70fa8bbb759aa37e9fa2 (diff) | |
download | drakx-backup-do-not-use-237ff88644c53046c933f6aaf18de8bc5515cb0d.tar drakx-backup-do-not-use-237ff88644c53046c933f6aaf18de8bc5515cb0d.tar.gz drakx-backup-do-not-use-237ff88644c53046c933f6aaf18de8bc5515cb0d.tar.bz2 drakx-backup-do-not-use-237ff88644c53046c933f6aaf18de8bc5515cb0d.tar.xz drakx-backup-do-not-use-237ff88644c53046c933f6aaf18de8bc5515cb0d.zip |
do not failled when hw db is corrupted
Diffstat (limited to 'perl-install')
-rwxr-xr-x | perl-install/standalone/service_harddrake | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake index bb5b86c75..08114a63c 100755 --- a/perl-install/standalone/service_harddrake +++ b/perl-install/standalone/service_harddrake @@ -65,7 +65,15 @@ if (find { $_->{driver} =~ /Card:NVIDIA/ } detect_devices::probeall()) { my $is_globetrotter = -f '/usr/sbin/mdkmove'; # first run ? if not read old hw config -my $previous_config = -f $last_boot_config && -s $last_boot_config ? Storable::retrieve($last_boot_config) : {}; +my $previous_config; + +if (-f $last_boot_config && -s $last_boot_config) { + eval { $previous_config = Storable::retrieve($last_boot_config) }; + log::explanations("resetting previous harware file ($@)") if $@; +} + +$previous_config ||= {}; + $previous_config = $$previous_config if ref($previous_config) !~ /HASH/; my (%config, $wait); my $in; @@ -105,7 +113,13 @@ foreach my $hw_class (@harddrake::data::tree) { modules::load_and_configure($modules_conf, 'ohci1394') if $Ident eq 'FIREWIRE_CONTROLLER' && any { $_->{driver} eq 'ohci1394' } @added; @added || @was_removed or next; + + if (harddrake::data::is_removable($Ident)) { + modules::load_category('floppy') if $Ident eq 'FLOPPY'; + } + next if $Ident eq 'MOUSE' && $curr_kernel ne $prev_kernel; + my @configurator_pool; if (harddrake::data::is_removable($Ident)) { foreach my $device (@ID{@added}) { |