With sys-apps/kmod having replaced sys-apps/module-init-tools on my system the -l option to modprobe that open-iscsi's initscript depends on appears to no longer be present, causing this error when running '/etc/init.d/iscsid start': iscsid | * Checking open-iSCSI configuration ... iscsid | * Loading iSCSI modules ... iscsid |modprobe: invalid option -- 'l' iscsid | * Loading libiscsi: not found ... [ !! ] | iscsid | * ERROR: iscsid failed to start (from this line) /etc/init.d/iscsid:55: if [ -n "$(modprobe -l | grep ${m})" ] While the man pages installed by kmod do not suggest a replacement, 'modprobe -nq ${m}' appears to work for this purpose, returning exit status 1 for missing modules and 0 for loadable or already loaded. The module-init-tools version of modprobe exhibits the same behaviour so it should be a safe fix for systems with either.
Confirmed. sys-block/open-iscsi-2.0.872-r1 was built with the following: USE="(multilib) -debug -slp" sys-apps/kmod-8 was built with the following: USE="(multilib) tools zlib -debug -doc -lzma -static-libs"
As said in comment #1, --- iscsid.orig 2012-06-18 13:19:55.243696604 +0200 +++ iscsid 2012-06-18 13:22:28.714753575 +0200 @@ -40,7 +40,7 @@ modopts="$@" for m in ${modules} do - if [ -n "$(modprobe -l | grep ${m})" ] + if modprobe --show --quiet "${m}" then ebegin "${msg} ${m}" modprobe ${modopts} ${m} fixes this issue.
or add function fmod() { [ "$1" = '' ] && find /lib/modules/$(uname -r) -iname *.ko -print | awk -F $(uname -r)/ '{print $NF}' [ "$1" != '' ] && find /lib/modules/$(uname -r) -iname "$1".ko -print | awk -F $(uname -r)/ '{print $NF}' } then - if [ -n "$(modprobe -l | grep ${m})" ] + if [ -n "$(fmod | grep ${m})" ] forum thread - Where'd modprobe -l go? http://forums.gentoo.org/viewtopic-t-934554-start-0-postdays-0-postorder-asc-highlight-.html
(In reply to comment #3) > or add function fmod() { > > [ "$1" = '' ] && find /lib/modules/$(uname -r) -iname *.ko -print | awk -F > $(uname -r)/ '{print $NF}' > > [ "$1" != '' ] && find /lib/modules/$(uname -r) -iname "$1".ko -print | awk > -F $(uname -r)/ '{print $NF}' > > } > > then > - if [ -n "$(modprobe -l | grep ${m})" ] > + if [ -n "$(fmod | grep ${m})" ] > > forum thread - Where'd modprobe -l go? > http://forums.gentoo.org/viewtopic-t-934554-start-0-postdays-0-postorder-asc- > highlight-.html That's not even remotely correct. modprobe -l showed the list of modules loaded. Not the list of modules available to load.
(In reply to comment #4) a long time ago you could use modprobe to list all available modules, but they broke it and not many people noticed :(
> (In reply to comment #3) > That's not even remotely correct. modprobe -l showed the list of modules > loaded. Not the list of modules available to load. No. modprobe -l lists *available* modules. (In reply to comment #5) > > a long time ago you could use modprobe to list all available modules, but > they broke it and not many people noticed :( modprobe(8) man page says -l --list List all modules matching the given wildcard (or "*" if no wild‐ card is given). This option is provided for backwards compati‐ bility and may go away in future: see find(1) and basename(1) for a more flexible alternative.(In reply to comment #4) *and may go away in future*
*** Bug 453488 has been marked as a duplicate of this bug. ***
(In reply to comment #2) > --- iscsid.orig 2012-06-18 13:19:55.243696604 +0200 > +++ iscsid 2012-06-18 13:22:28.714753575 +0200 > @@ -40,7 +40,7 @@ > modopts="$@" > for m in ${modules} > do > - if [ -n "$(modprobe -l | grep ${m})" ] > + if modprobe --show --quiet "${m}" > then > ebegin "${msg} ${m}" > modprobe ${modopts} ${m} > > fixes this issue. Looks good. @base-system, commit this with revbump, please
(In reply to comment #8) > (In reply to comment #2) > > --- iscsid.orig 2012-06-18 13:19:55.243696604 +0200 > > +++ iscsid 2012-06-18 13:22:28.714753575 +0200 > > @@ -40,7 +40,7 @@ > > modopts="$@" > > for m in ${modules} > > do > > - if [ -n "$(modprobe -l | grep ${m})" ] > > + if modprobe --show --quiet "${m}" > > then > > ebegin "${msg} ${m}" > > modprobe ${modopts} ${m} > > > > fixes this issue. > > Looks good. @base-system, commit this with revbump, please Bigger refactor coming with the version bump.
Why not just remove the whole 'if' clause and 'else' clause? That's how I fixed it here. If module 'foo' doesn't exist, modprobe will say so and return error. The If block is needless complexity. Get rid of it and nobody has to worry that 'modprobe -nq' may also be removed someday.
Hi folks, Have the same bug here. Why the new init sceipt is not available when "etc-update" ?
(In reply to comment #9) > (In reply to comment #8) > > (In reply to comment #2) > > > --- iscsid.orig 2012-06-18 13:19:55.243696604 +0200 > > > +++ iscsid 2012-06-18 13:22:28.714753575 +0200 > > > @@ -40,7 +40,7 @@ > > > modopts="$@" > > > for m in ${modules} > > > do > > > - if [ -n "$(modprobe -l | grep ${m})" ] > > > + if modprobe --show --quiet "${m}" > > > then > > > ebegin "${msg} ${m}" > > > modprobe ${modopts} ${m} > > > > > > fixes this issue. > > > > Looks good. @base-system, commit this with revbump, please > > Bigger refactor coming with the version bump. I realize you wanted to bump this with a fix for this bug too, but fact is that kmod is now stable and module-init-tools lastrited so "time up" :) I've committed the fix from Comment #8 (Well, Comment #1) as -r2
*** Bug 468290 has been marked as a duplicate of this bug. ***