summaryrefslogtreecommitdiffstats
path: root/perl-install/modules/modprobe_conf.pm
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2009-08-13 10:18:59 +0000
committerPascal Terjan <pterjan@mandriva.org>2009-08-13 10:18:59 +0000
commit4cc1c0b680f7b4bad646323465d08e4e339a63a6 (patch)
treefd052fdf9b19b92e42a3af9a4e2011ae47b51b77 /perl-install/modules/modprobe_conf.pm
parente02dd188820803e2c1deffe311de9cca17696072 (diff)
downloaddrakx-4cc1c0b680f7b4bad646323465d08e4e339a63a6.tar
drakx-4cc1c0b680f7b4bad646323465d08e4e339a63a6.tar.gz
drakx-4cc1c0b680f7b4bad646323465d08e4e339a63a6.tar.bz2
drakx-4cc1c0b680f7b4bad646323465d08e4e339a63a6.tar.xz
drakx-4cc1c0b680f7b4bad646323465d08e4e339a63a6.zip
but still allow removing install lines
Diffstat (limited to 'perl-install/modules/modprobe_conf.pm')
-rw-r--r--perl-install/modules/modprobe_conf.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/perl-install/modules/modprobe_conf.pm b/perl-install/modules/modprobe_conf.pm
index e0169ecf4..c97e2c045 100644
--- a/perl-install/modules/modprobe_conf.pm
+++ b/perl-install/modules/modprobe_conf.pm
@@ -25,9 +25,8 @@ sub get_above {
}
sub set_above {
my ($conf, $module, $o_modules) = @_;
- return unless $o_modules;
$module = $conf->mapping($module);
- my @modules = $conf->mapping(split(' ', $o_modules));
+ my @modules = $conf->mapping(split(' ', $o_modules || ''));
{ #- first add to "install" command
my ($before, $after) = parse_non_virtual($module, $conf->{$module}{install});
@@ -103,7 +102,7 @@ sub parse_non_virtual {
sub unparse_non_virtual {
my ($module, $mode, $before, $after) = @_;
($before ? "$before; " : '')
- . "/sbin/modprobe --first-time $mode $module"
+ . (($before || $after) ? "/sbin/modprobe --first-time $mode $module" : '')
. ($after ? " && { $after; /bin/true; }" : '');
}