Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 26288 - module init.d script output looks weird if no modules are loaded
Summary: module init.d script output looks weird if no modules are loaded
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-09 12:51 UTC by SpanKY
Modified: 2003-08-10 16:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
/etc/init.d/modules (modules,2.84 KB, text/plain)
2003-08-10 16:29 UTC, Martin Schlemmer (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2003-08-09 12:51:43 UTC
i dont have any modules autoload so my output looks like this: * Calculating module dependencies...                                   [ ok ] * Using /etc/modules.autoload.d/kernel-2.6:  * Checking all filesystems...                                          [ ok ]  personally, i dont like the blank line, plus the colon w/out anything after it strikes me as funny ;)  what i'd suggest is changing the load_modules() function to count the # of modules loaded, and outside of the while loop, instead of running 'echo', doing the following: if [ ${modcount} -eq 0 ] ; then     einfo "No modules autoloaded" elif [ ${modcount} -eq 1 ] ; then     einfo "Autoloaded 1 module" else     einfo "Autoloaded ${modcount} modules" fi  or, this would just be fine if you think that's a little too much :) einfo "Autoloaded ${modcount} module(s)"
Comment 1 SpanKY gentoo-dev 2003-08-09 15:45:56 UTC
i dont have any modules autoload so my output looks like this:
* Calculating module dependencies...                                   [ ok ]
* Using /etc/modules.autoload.d/kernel-2.6:

* Checking all filesystems...                                          [ ok ]

personally, i dont like the blank line, plus the colon w/out anything after it strikes me as funny ;)

what i'd suggest is changing the load_modules() function to count the # of modules loaded, and, outside of the while loop, instead of running 'echo', doing
the following:
if [ ${modcount} -eq 0 ] ; then
    einfo "No modules autoloaded"
elif [ ${modcount} -eq 1 ] ; then
    einfo "Autoloaded 1 module"
else
    einfo "Autoloaded ${modcount} modules"
fi

or, this would just be fine if you think that's a little too much :)
einfo "Autoloaded ${modcount} module(s)"
Comment 2 Martin Schlemmer (RETIRED) gentoo-dev 2003-08-10 16:29:01 UTC
Created attachment 15870 [details]
/etc/init.d/modules

Should do as requested.
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2003-08-10 16:31:13 UTC
Fixed in CVS, thanks.