diff options
author | Pascal Terjan <pterjan@mageia.org> | 2012-04-08 00:38:12 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2012-04-08 00:38:12 +0000 |
commit | 997855ef748656c0a76eef4ecd2467f3395bdc0c (patch) | |
tree | c8b36d6e18d7f9a13ff75bd644a5e5c22ea57b90 /rescue/tree/sbin/modprobe | |
parent | 18bcaa0a0fcdf07971fdd50bb1b8ea3bd10db555 (diff) | |
download | drakx-997855ef748656c0a76eef4ecd2467f3395bdc0c.tar drakx-997855ef748656c0a76eef4ecd2467f3395bdc0c.tar.gz drakx-997855ef748656c0a76eef4ecd2467f3395bdc0c.tar.bz2 drakx-997855ef748656c0a76eef4ecd2467f3395bdc0c.tar.xz drakx-997855ef748656c0a76eef4ecd2467f3395bdc0c.zip |
fix modprobe to support being called by kernel (mga#5274)
Diffstat (limited to 'rescue/tree/sbin/modprobe')
-rwxr-xr-x | rescue/tree/sbin/modprobe | 4 |
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(' ', @_) }); } |