Correct syntax for /etc/conf.d/modules
I am getting confused about the syntax that openrc is meant to follow ...
One box of mine that uses modules ran some script at the time that I upgraded to openrc and it added my currently running modules into /etc/conf.d/modules. The syntax was like so: modules_2_6="${modules_2_6} cls_tcindex" module_cls_tcindex_args_2_6=" Things moved on and with newer kernel versions I went to update the file after I had a look at the documentation: http://www.gentoo.org/doc/en/openrc-migration.xml Well there is no ${modules_2_6} shown in the examples so I removed it from my /etc/conf.d/modules. The new syntax was now: modules_3_2="cls_tcindex" and guess what? No modules loaded at all when I reboot. :-/ I had to add ${modules_3_2} in there to get things going again. However 'echo ${modules_3_2}' on the CLI does not show anything. Can you please explain why this variable is needed for modules to load up again and why it is not shown in the documentation? -- Regards, Mick |
Correct syntax for /etc/conf.d/modules
Am 21.04.2012 20:56, schrieb Mick:
> I am getting confused about the syntax that openrc is meant to follow ... > > One box of mine that uses modules ran some script at the time that I upgraded > to openrc and it added my currently running modules into /etc/conf.d/modules. > > The syntax was like so: > > modules_2_6="${modules_2_6} cls_tcindex" > module_cls_tcindex_args_2_6=" > > Things moved on and with newer kernel versions I went to update the file after > I had a look at the documentation: > > http://www.gentoo.org/doc/en/openrc-migration.xml > > Well there is no ${modules_2_6} shown in the examples so I removed it from my > /etc/conf.d/modules. The new syntax was now: > > modules_3_2="cls_tcindex" > > and guess what? No modules loaded at all when I reboot. :-/ > > > I had to add ${modules_3_2} in there to get things going again. > > However 'echo ${modules_3_2}' on the CLI does not show anything. Can you > please explain why this variable is needed for modules to load up again and > why it is not shown in the documentation? I guess it is "modules_3" now. With the transition to 3.x, the numbering scheme has changed and minor numbers change much more frequently. You can also simply use "modules=" unless you have a reason for distinguishing between versions. At least, that's what I use here. Hope this helps, Florian Philipp |
Correct syntax for /etc/conf.d/modules
On Sunday 22 Apr 2012 00:20:38 Florian Philipp wrote:
> Am 21.04.2012 20:56, schrieb Mick: > > I am getting confused about the syntax that openrc is meant to follow ... > > > > One box of mine that uses modules ran some script at the time that I > > upgraded to openrc and it added my currently running modules into > > /etc/conf.d/modules. > > > > The syntax was like so: > > > > modules_2_6="${modules_2_6} cls_tcindex" > > module_cls_tcindex_args_2_6=" > > > > Things moved on and with newer kernel versions I went to update the file > > after > > > > I had a look at the documentation: > > http://www.gentoo.org/doc/en/openrc-migration.xml > > > > Well there is no ${modules_2_6} shown in the examples so I removed it > > from my /etc/conf.d/modules. The new syntax was now: > > > > modules_3_2="cls_tcindex" > > > > and guess what? No modules loaded at all when I reboot. :-/ > > > > > > I had to add ${modules_3_2} in there to get things going again. > > > > However 'echo ${modules_3_2}' on the CLI does not show anything. Can you > > please explain why this variable is needed for modules to load up again > > and why it is not shown in the documentation? > > I guess it is "modules_3" now. With the transition to 3.x, the numbering > scheme has changed and minor numbers change much more frequently. > > You can also simply use "modules=" unless you have a reason for > distinguishing between versions. At least, that's what I use here. > > Hope this helps, > Florian Philipp Thanks Florian, I did try: modules="cls_tcindex" modules_3="cls_tcindex" modules_3_2="cls_tcindex" modules_3_2="${modules_3_2} cls_tcindex" and only the last one actually loads. I don't understand how this works or what ${modules_3_2} does ... but following the documentation recommended syntax won't autoload modules at boot here. PS. Is there a way to check if a particular syntax will load *without* having to reboot each time I make a change? -- Regards, Mick |
Correct syntax for /etc/conf.d/modules
On Sun, 22 Apr 2012 08:02:13 +0100, Mick wrote:
> modules_3_2="cls_tcindex" > modules_3_2="${modules_3_2} cls_tcindex" > > and only the last one actually loads. I don't understand how this > works or what ${modules_3_2} does ... The first one replaces the contents of modules_3_2 with cls_tcindex, the second adds cls_tcindex to any existing contents of modules_3_2. They are the string equivalents of x=1 x=x+1 -- Neil Bothwick "Be strict when sending and tolerant when receiving." RFC 1958 - Architectural Principles of the Internet - section 3.9 |
Correct syntax for /etc/conf.d/modules
On Sunday 22 Apr 2012 09:16:43 Neil Bothwick wrote:
> On Sun, 22 Apr 2012 08:02:13 +0100, Mick wrote: > > modules_3_2="cls_tcindex" > > modules_3_2="${modules_3_2} cls_tcindex" > > > > and only the last one actually loads. I don't understand how this > > works or what ${modules_3_2} does ... > > The first one replaces the contents of modules_3_2 with cls_tcindex, the > second adds cls_tcindex to any existing contents of modules_3_2. They are > the string equivalents of > > x=1 > x=x+1 Awww! I see! So, if I have a list of modules on separate lines; e.g. modules_3_2="x" modules_3_2="y" modules_3_2="z" only module z will load - unless I add the ${modules_3_2} string! It makes sense now. Thank you for explaining this! :-) -- Regards, Mick |
| All times are GMT. The time now is 06:32 AM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.