diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-02-22 11:48:16 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-02-22 11:48:16 +0000 |
commit | a008ac30cf08a160d5d3f042c1dd7f3375f3e880 (patch) | |
tree | 42a3d83929286e4a65c888b178b14d8872645355 /lib/network/ndiswrapper.pm | |
parent | f1c7dc4a20e190d52131bb7a406481af376021d7 (diff) | |
download | drakx-net-a008ac30cf08a160d5d3f042c1dd7f3375f3e880.tar drakx-net-a008ac30cf08a160d5d3f042c1dd7f3375f3e880.tar.gz drakx-net-a008ac30cf08a160d5d3f042c1dd7f3375f3e880.tar.bz2 drakx-net-a008ac30cf08a160d5d3f042c1dd7f3375f3e880.tar.xz drakx-net-a008ac30cf08a160d5d3f042c1dd7f3375f3e880.zip |
sort modules according to /proc/modules when removing conflicting modules to handle module deps nicely
Diffstat (limited to 'lib/network/ndiswrapper.pm')
-rw-r--r-- | lib/network/ndiswrapper.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/network/ndiswrapper.pm b/lib/network/ndiswrapper.pm index 2940dbc..3bf7bd3 100644 --- a/lib/network/ndiswrapper.pm +++ b/lib/network/ndiswrapper.pm @@ -85,7 +85,8 @@ Do you really want to use a ndiswrapper driver?", $conflicts[0]->{drivers}[0])) #- stop old interfaces network::tools::stop_interface($_->{interface}, 0) foreach grep { defined $_->{interface} } @conflicts; #- unload old modules before trying to load ndiswrapper - my @drivers = map { @{$_->{drivers}} } @conflicts; + #- (sorted according to /proc/modules to handle deps nicely) + my @drivers = intersection([ modules::loaded_modules() ], [ map { @{$_->{drivers}} } @conflicts ]); eval { modules::unload($_) } foreach @drivers; } |