diff options
author | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2001-11-30 09:13:30 +0000 |
---|---|---|
committer | Gwenolé Beauchesne <gbeauchesne@mandriva.org> | 2001-11-30 09:13:30 +0000 |
commit | 61b5307bfdd85a3c95b1c2813f2bcfa043856a6b (patch) | |
tree | 02e65a967b643beddb7d771ba38e0528637790a1 | |
parent | 4c126c53ba97b51a89bbdca8f455bdeb7275909a (diff) | |
download | drakx-61b5307bfdd85a3c95b1c2813f2bcfa043856a6b.tar drakx-61b5307bfdd85a3c95b1c2813f2bcfa043856a6b.tar.gz drakx-61b5307bfdd85a3c95b1c2813f2bcfa043856a6b.tar.bz2 drakx-61b5307bfdd85a3c95b1c2813f2bcfa043856a6b.tar.xz drakx-61b5307bfdd85a3c95b1c2813f2bcfa043856a6b.zip |
Suckiness fixes from mainline (gc):
- Do parse /proc/modules in reverse order
- Fix "convert old scsi_hostadapter's to new probeall" scheme
-rw-r--r-- | perl-install/modules.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm index 9a64a1046..67da69e6f 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -621,7 +621,7 @@ sub load_raw { } sub read_already_loaded() { - foreach (cat_("/proc/modules")) { + foreach (reverse cat_("/proc/modules")) { my ($name) = split; $conf{$name}{loaded} = 1; when_load($name, $drivers{$name}{type}); @@ -661,9 +661,11 @@ sub read_conf { } } #- convert old scsi_hostadapter's to new probeall - while (my ($alias, $type) = each %c) { - $alias =~ /^scsi_hostadapter/ && $type->{alias} or next; - push @{$c{scsi_hostadapter}{probeall} ||= []}, delete $type->{alias}; + my @old_scsi_hostadapters = + map { $_->[0] } sort { $a->[1] <=> $b->[1] } + map { if_(/^scsi_hostadapter(\d*)/ && $c{$_}{alias}, [ $_, $1 || 0 ]) } keys %c; + foreach my $alias (@old_scsi_hostadapters) { + push @{$c{scsi_hostadapter}{probeall} ||= []}, delete $c{$alias}{alias}; } \%c; |