From f1c7dc4a20e190d52131bb7a406481af376021d7 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 22 Feb 2008 11:47:10 +0000 Subject: stop conflicting interfaces before removing conflicting modules --- lib/network/ndiswrapper.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/network') 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; -- cgit v1.2.1