diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-05-23 18:25:24 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-05-23 18:25:24 +0000 |
commit | 0212e65bf1a73a2616bf7ee387f511d5222e3bf7 (patch) | |
tree | 450fdcfad9b518f6ecd24aa8e1ea76745f22108a /rescue | |
parent | 27faad223f46b39eb2f92a47fcf6e32c1af326ff (diff) | |
download | drakx-0212e65bf1a73a2616bf7ee387f511d5222e3bf7.tar drakx-0212e65bf1a73a2616bf7ee387f511d5222e3bf7.tar.gz drakx-0212e65bf1a73a2616bf7ee387f511d5222e3bf7.tar.bz2 drakx-0212e65bf1a73a2616bf7ee387f511d5222e3bf7.tar.xz drakx-0212e65bf1a73a2616bf7ee387f511d5222e3bf7.zip |
(modprobe) simplify
Diffstat (limited to 'rescue')
-rwxr-xr-x | rescue/tree/sbin/modprobe | 6 |
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(' ', @_) }); } |