From 997855ef748656c0a76eef4ecd2467f3395bdc0c Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Sun, 8 Apr 2012 00:38:12 +0000 Subject: fix modprobe to support being called by kernel (mga#5274) --- rescue/tree/sbin/modprobe | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rescue/tree/sbin/modprobe') 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 []\n"; + # kernel calls us with modprobe -q -- , 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(' ', @_) }); } -- cgit v1.2.1