summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/modules.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index d4224b2ca..f095d0afb 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -409,7 +409,12 @@ sub unload($;$) {
if ($::testing) {
log::l("rmmod $m");
} else {
- run_program::run("rmmod", $m) && delete $conf{$m}{loaded};
+ if (run_program::run("rmmod", $m)) {
+ delete $conf{$m}{loaded};
+ }
+ }
+ foreach (keys %loaded) {
+ @{$loaded{$_}} = grep { $m ne $_ } @{$loaded{$_}};
}
remove_alias($m) if $remove_alias;
}