summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrescue/tree/sbin/modprobe6
1 files changed, 2 insertions, 4 deletions
diff --git a/rescue/tree/sbin/modprobe b/rescue/tree/sbin/modprobe
index 43c4a8019..0e5eaea2c 100755
--- a/rescue/tree/sbin/modprobe
+++ b/rescue/tree/sbin/modprobe
@@ -7,11 +7,9 @@ use modules;
# based on install::commands
sub modprobe {
!@_ || $_[0] =~ /^-?-h/ and die "usage: modprobe <module> [<options...>]\n";
+ my $name;
# kernel calls us with modprobe -q -- <module>, so ignore options
- my $name = shift;
- while (substr($name, 0, 1) eq "-") {
- $name = shift;
- }
+ do { $name= shift } while substr($name, 0, 1) eq "-";
list_modules::load_default_moddeps();
modules::load_with_options([ $name ], { $name => join(' ', @_) });
}