summaryrefslogtreecommitdiffstats
path: root/rescue/tree
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2012-04-08 00:38:12 +0000
committerPascal Terjan <pterjan@mageia.org>2012-04-08 00:38:12 +0000
commit87c6698a6e18fb491e5bfec67ab5a02a6f9d3c88 (patch)
treec8b36d6e18d7f9a13ff75bd644a5e5c22ea57b90 /rescue/tree
parentc7d785183fc5659f3ca52f05a2d71e3032afb2f5 (diff)
downloaddrakx-backup-do-not-use-87c6698a6e18fb491e5bfec67ab5a02a6f9d3c88.tar
drakx-backup-do-not-use-87c6698a6e18fb491e5bfec67ab5a02a6f9d3c88.tar.gz
drakx-backup-do-not-use-87c6698a6e18fb491e5bfec67ab5a02a6f9d3c88.tar.bz2
drakx-backup-do-not-use-87c6698a6e18fb491e5bfec67ab5a02a6f9d3c88.tar.xz
drakx-backup-do-not-use-87c6698a6e18fb491e5bfec67ab5a02a6f9d3c88.zip
fix modprobe to support being called by kernel (mga#5274)
Diffstat (limited to 'rescue/tree')
-rwxr-xr-xrescue/tree/sbin/modprobe4
1 files changed, 4 insertions, 0 deletions
diff --git a/rescue/tree/sbin/modprobe b/rescue/tree/sbin/modprobe
index a9cd91a89..43c4a8019 100755
--- a/rescue/tree/sbin/modprobe
+++ b/rescue/tree/sbin/modprobe
@@ -7,7 +7,11 @@ use modules;
# based on install::commands
sub modprobe {
!@_ || $_[0] =~ /^-?-h/ and die "usage: modprobe <module> [<options...>]\n";
+ # kernel calls us with modprobe -q -- <module>, so ignore options
my $name = shift;
+ while (substr($name, 0, 1) eq "-") {
+ $name = shift;
+ }
list_modules::load_default_moddeps();
modules::load_with_options([ $name ], { $name => join(' ', @_) });
}