modprobe: fix modprobe -r and parsing of /etc/modprobe.d

This fixes a regression introduced with commit 78854520 (modprobe:
revert checking for /, stop doing basename() on modprobe args,
2015-01-01) that broke modprobe options stored in /etc/modprobe.conf and
/etc/modprobe.d/*.conf.

This also fixes modprobe -r

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Natanael Copa 2015-01-16 13:53:05 +01:00 committed by Denys Vlasenko
parent 76b2262b9b
commit 9de69c024c
1 changed files with 1 additions and 1 deletions

View File

@ -425,7 +425,7 @@ static int do_modprobe(struct module_entry *m)
rc = 0;
fn = llist_pop(&m->deps); /* we leak it */
m2 = get_or_add_modentry(fn);
m2 = get_or_add_modentry(bb_get_last_path_component_nostrip(fn));
if (option_mask32 & OPT_REMOVE) {
/* modprobe -r */