summaryrefslogtreecommitdiffstats
path: root/lib/network/ndiswrapper.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-02-22 11:47:10 +0000
committerOlivier Blin <oblin@mandriva.com>2008-02-22 11:47:10 +0000
commitf1c7dc4a20e190d52131bb7a406481af376021d7 (patch)
tree5467bb3056e1d2bf151d150c156ac2fea4d214c3 /lib/network/ndiswrapper.pm
parent9a995e3b874f6e8f0763c05d9e6421d633b5a199 (diff)
downloaddrakx-net-f1c7dc4a20e190d52131bb7a406481af376021d7.tar
drakx-net-f1c7dc4a20e190d52131bb7a406481af376021d7.tar.gz
drakx-net-f1c7dc4a20e190d52131bb7a406481af376021d7.tar.bz2
drakx-net-f1c7dc4a20e190d52131bb7a406481af376021d7.tar.xz
drakx-net-f1c7dc4a20e190d52131bb7a406481af376021d7.zip
stop conflicting interfaces before removing conflicting modules
Diffstat (limited to 'lib/network/ndiswrapper.pm')
-rw-r--r--lib/network/ndiswrapper.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/network/ndiswrapper.pm b/lib/network/ndiswrapper.pm
index 184075f..2940dbc 100644
--- a/lib/network/ndiswrapper.pm
+++ b/lib/network/ndiswrapper.pm
@@ -82,6 +82,8 @@ sub setup_device {
if (@conflicts) {
$in->ask_yesorno(N("Warning"), N("The selected device has already been configured with the %s driver.
Do you really want to use a ndiswrapper driver?", $conflicts[0]->{drivers}[0])) or return;
+ #- 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;
eval { modules::unload($_) } foreach @drivers;