summaryrefslogtreecommitdiffstats
path: root/perl-install/modules/any_conf.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-09-07 14:40:10 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-09-07 14:40:10 +0000
commit25b773a0184f2d30d4b7462f174f253d26c9d8ff (patch)
tree2934675d8df7c4b0aaa95cd314d09714b7d0255e /perl-install/modules/any_conf.pm
parent71a190f8d6467d8f9154f7fd72e128dca4b626bf (diff)
downloaddrakx-25b773a0184f2d30d4b7462f174f253d26c9d8ff.tar
drakx-25b773a0184f2d30d4b7462f174f253d26c9d8ff.tar.gz
drakx-25b773a0184f2d30d4b7462f174f253d26c9d8ff.tar.bz2
drakx-25b773a0184f2d30d4b7462f174f253d26c9d8ff.tar.xz
drakx-25b773a0184f2d30d4b7462f174f253d26c9d8ff.zip
(remove_module) better written this way
Diffstat (limited to 'perl-install/modules/any_conf.pm')
-rw-r--r--perl-install/modules/any_conf.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/perl-install/modules/any_conf.pm b/perl-install/modules/any_conf.pm
index e3bbb318c..42050cd04 100644
--- a/perl-install/modules/any_conf.pm
+++ b/perl-install/modules/any_conf.pm
@@ -105,9 +105,11 @@ sub remove_module {
my ($conf, $module) = @_;
return if !$module;
$module = $conf->mapping($module);
- substInFile {
- undef $_ if /^$module/;
- } $_ foreach "$::prefix/etc/modules", "$::prefix/etc/modprobe.preload";
+ foreach my $file ("$::prefix/etc/modules", "$::prefix/etc/modprobe.preload") {
+ substInFile {
+ undef $_ if /^$module/;
+ } $file;
+ }
$conf->remove_alias($module);
log::explanations("removing module $module");