Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 88553 - /etc/init.d/modules from sys-apps/baselayout-1.9.4-r6 confused by comments.
Summary: /etc/init.d/modules from sys-apps/baselayout-1.9.4-r6 confused by comments.
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
: 88898 (view as bug list)
Depends on:
Reported: 2005-04-10 01:38 UTC by Talamona Francesco
Modified: 2005-04-27 22:33 UTC (History)
1 user (show)

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

awk simple trick (trailingslash.diff,234 bytes, patch)
2005-04-10 01:39 UTC, Talamona Francesco
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Talamona Francesco 2005-04-10 01:38:19 UTC
I recently switched off initrd. Some modules were loaded no more. The reason is the way /etc/init.d/modules treates slashes.

The header in /etc/modules.autoload says about comments:
" Add the names of modules that you'd like to load when the system starts into this file, one per line.  Comments begin with # and are ignored.  Read man modules.autoload for additional details.

It should warn not to add any slashes after module parameters.
For example if in /etc/modules.autoload I have:

modulename moduleparameter # comment

init scripts try to modprobe the whole line (so module fail to load).

Alternatively I propose a patch for /etc/init.d/modules to cut off everything following a slash; hoping this will not break any policies.
Comment 1 Talamona Francesco 2005-04-10 01:39:46 UTC
Created attachment 55838 [details, diff]
awk simple trick
Comment 2 Talamona Francesco 2005-04-10 05:36:05 UTC
Typo: sorry, I was speaking about hashes "#", not slashes "/"
Comment 3 Erlend Davidson 2005-04-12 15:21:19 UTC
*** Bug 88898 has been marked as a duplicate of this bug. ***
Comment 4 SpanKY gentoo-dev 2005-04-26 19:53:40 UTC
what about this change instead:
-            sub(/^[[:space:]]*[^[:space:]]*[[:space:]]*/, "")
+            sub(/^[[:space:]]*[^[:space:]#]*[[:space:]]*/, "")

does that work for you ?
Comment 5 Talamona Francesco 2005-04-26 23:09:59 UTC
unfortunately this doesn't work for me, I've tried various combinations:
Comment 6 SpanKY gentoo-dev 2005-04-27 20:38:15 UTC
yeah, that doesnt work, but this does:

             sub(/^[[:space:]]*[^[:space:]]*[[:space:]]*/, "")
+            sub(/#.*$/, "")
             ARGS[COUNT] = $0

i'll add this to cvs
Comment 7 Talamona Francesco 2005-04-27 22:33:54 UTC
Great! Thanks.