summaryrefslogtreecommitdiffstats
path: root/rescue/tree/sbin/modprobe
diff options
context:
space:
mode:
Diffstat (limited to 'rescue/tree/sbin/modprobe')
-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(' ', @_) });
}