summaryrefslogtreecommitdiffstats
path: root/lib/network/ndiswrapper.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-02-22 11:40:10 +0000
committerOlivier Blin <oblin@mandriva.com>2008-02-22 11:40:10 +0000
commitdc50baf601d97a54e906ae4fdae06b9a5be4059c (patch)
treec46b4608189199aab83352c3c9303225366bfc66 /lib/network/ndiswrapper.pm
parent2671b9fc633eee864bd4d7d2df720be27771525b (diff)
downloaddrakx-net-dc50baf601d97a54e906ae4fdae06b9a5be4059c.tar
drakx-net-dc50baf601d97a54e906ae4fdae06b9a5be4059c.tar.gz
drakx-net-dc50baf601d97a54e906ae4fdae06b9a5be4059c.tar.bz2
drakx-net-dc50baf601d97a54e906ae4fdae06b9a5be4059c.tar.xz
drakx-net-dc50baf601d97a54e906ae4fdae06b9a5be4059c.zip
reload ndiswrapper module after having handled conflicting modules
Diffstat (limited to 'lib/network/ndiswrapper.pm')
-rw-r--r--lib/network/ndiswrapper.pm18
1 files changed, 9 insertions, 9 deletions
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!"));