* [gentoo-dev] Loading Modules from Init Scripts?
@ 2002-01-25 22:31 Chad M. Huneycutt
2002-01-25 22:43 ` Craig M. Reece
0 siblings, 1 reply; 2+ messages in thread
From: Chad M. Huneycutt @ 2002-01-25 22:31 UTC (permalink / raw
To: gentoo-dev
Hi all,
Do we have a policy about init scripts loading modules? I didn't think
the scripts for any packages that I have installed load modules, but I
don't have everything installed. It seems like the preferred way to do it
is to have the admin put any necessary modules in /etc/modules.autoload.
Here is why I ask. The pcmcia init script that is installed with
pcmcia-cs currently is outdated, but it loads the $PCIC (i82365 or
yenta_socket) module, as well as pcmcia_core and ds. Then it starts
cardmgr (which will not start without ds loaded). The init script does not
unload the modules when it is stopped, though.
It makes sense that if a service requires particular kernel
functionality to be available in order to work that it should load the
modules for that functionality. However, this adds some overhead to the
initscript, in that you have to determine if the module exists, load it,
make sure it loads, etc. before starting the service. Then what about when
the functionality has been built into the kernel, not as a module. Do we
have to detect that? That is why I think it might be easier if we make it
policy to just eerror out and say "You have to first load these modules!"
rather than worrying about loading them in the script.
If we decide to load modules from the scripts, then it would be nice to
have some convenience routines to facilitate the process, e.g.,
load_modules pcmcia_core i82365 ds || die
or something like that, which would check to see if the modules were
already loaded (or maybe even compiled into the kernel), and if not, then
it would load them.
Thoughts?
Chad
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gentoo-dev] Loading Modules from Init Scripts?
2002-01-25 22:31 [gentoo-dev] Loading Modules from Init Scripts? Chad M. Huneycutt
@ 2002-01-25 22:43 ` Craig M. Reece
0 siblings, 0 replies; 2+ messages in thread
From: Craig M. Reece @ 2002-01-25 22:43 UTC (permalink / raw
To: gentoo-dev
On Friday 25 January 2002 05:31 pm, Chad M. Huneycutt wrote thusly:
> Hi all,
> Do we have a policy about init scripts loading modules? I didn't think
> the scripts for any packages that I have installed load modules, but I
> don't have everything installed. It seems like the preferred way to do it
> is to have the admin put any necessary modules in /etc/modules.autoload.
>
My impression is that /etc/modules.autoload is used for modules that you
_always_ want loaded. Thus, the init script should load its own needed stuff
since we would then be assuming that the script is not _always_ run.
> Here is why I ask. The pcmcia init script that is installed with
> pcmcia-cs currently is outdated, but it loads the $PCIC (i82365 or
> yenta_socket) module, as well as pcmcia_core and ds. Then it starts
> cardmgr (which will not start without ds loaded). The init script does not
> unload the modules when it is stopped, though.
>
> It makes sense that if a service requires particular kernel
> functionality to be available in order to work that it should load the
> modules for that functionality. However, this adds some overhead to the
> initscript, in that you have to determine if the module exists, load it,
> make sure it loads, etc. before starting the service. Then what about when
> the functionality has been built into the kernel, not as a module. Do we
> have to detect that? That is why I think it might be easier if we make it
> policy to just eerror out and say "You have to first load these modules!"
> rather than worrying about loading them in the script.
>
> If we decide to load modules from the scripts, then it would be nice to
> have some convenience routines to facilitate the process, e.g.,
>
> load_modules pcmcia_core i82365 ds || die
>
> or something like that, which would check to see if the modules were
> already loaded (or maybe even compiled into the kernel), and if not, then
> it would load them.
>
> Thoughts?
>
I like this method a lot better than the way the pcmcia-cs package's default
init goes about doing things.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-01-25 22:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-25 22:31 [gentoo-dev] Loading Modules from Init Scripts? Chad M. Huneycutt
2002-01-25 22:43 ` Craig M. Reece
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox