From dc50baf601d97a54e906ae4fdae06b9a5be4059c Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 22 Feb 2008 11:40:10 +0000 Subject: reload ndiswrapper module after having handled conflicting modules --- lib/network/ndiswrapper.pm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lib/network/ndiswrapper.pm') diff --git a/lib/network/ndiswrapper.pm b/lib/network/ndiswrapper.pm index 27df51c..4a9e326 100644 --- a/lib/network/ndiswrapper.pm +++ b/lib/network/ndiswrapper.pm @@ -78,15 +78,6 @@ sub find_interface { sub setup_device { my ($in, $device) = @_; - #- unload ndiswrapper first so that the newly installed .inf files will be read - eval { modules::unload("ndiswrapper") }; - eval { modules::load("ndiswrapper") }; - - if ($@) { - $in->ask_warn(N("Error"), N("Unable to load the ndiswrapper module!")); - return; - } - my @conflicts = find_conflicting_devices($device); if (@conflicts) { $in->ask_yesorno(N("Warning"), N("The selected device has already been configured with the %s driver. @@ -97,6 +88,15 @@ Do you really want to use a ndiswrapper driver?", $conflicts[0][1])) or return; eval { modules::load("ndiswrapper") }; } + #- unload ndiswrapper first so that the newly installed .inf files will be read + eval { modules::unload("ndiswrapper") }; + eval { modules::load("ndiswrapper") }; + + if ($@) { + $in->ask_warn(N("Error"), N("Unable to load the ndiswrapper module!")); + return; + } + my $interface = find_interface($device); unless ($interface) { $in->ask_warn(N("Error"), N("Unable to find the ndiswrapper interface!")); -- cgit v1.2.1