summaryrefslogtreecommitdiffstats
path: root/rescue
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
commit997855ef748656c0a76eef4ecd2467f3395bdc0c (patch)
treec8b36d6e18d7f9a13ff75bd644a5e5c22ea57b90 /rescue
parent18bcaa0a0fcdf07971fdd50bb1b8ea3bd10db555 (diff)
downloaddrakx-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')
-rw-r--r--rescue/NEWS2
-rwxr-xr-xrescue/tree/sbin/modprobe4
2 files changed, 6 insertions, 0 deletions
diff --git a/rescue/NEWS b/rescue/NEWS
index 9e7806790..040591fa2 100644
--- a/rescue/NEWS
+++ b/rescue/NEWS
@@ -1,3 +1,5 @@
+- fix modprobe to support being called by kernel (mga#5274)
+
Version 1.35 - 5 April 2012, by Thierry Vignaud
- add chrooted rescue system in PATH
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(' ', @_) });
}