Re: Testers wanted: exorcised kmod.c: no more daemon!

Greg Zornetzer (gaz@andrew.cmu.edu)
Tue, 14 Apr 1998 22:30:37 -0400 (EDT)


On 14 Apr 1998, Stefan Monnier wrote:

> > > by default would solve many of the "my mixer settings aren't saved"
> > Maybe someone should hack the sound module to take initial mixer settings
> > on startup. (this is why I don't modularize sound =])
>
> It's probably better to have some way to save currenbt settings to a file when
> you unload the module. Is that possible ?
>
So, that's what I was trying to talk about in my post earlier. Preinstall
and postinstall lines in /etc/conf.modules are nice, but as someone
pointed out, they cause the sound card to "pop" while the mixer settings
go way up upon initialization, and then down upon the mixer reset.
If it were possible for the mixer settings to be available as a sysctl
_before_ the driver tells the card to fire itself up, it could call
something like request_module("loadset_sb"), that would be picked up by a
modified modprobe. Modprobe would read the settings from a file at a
predefined location, and insert them via sysctl.

At module cleanup, a similar process would occur:
cleanup_module() calls request_module("saveset_sb")
Modprobe interprets this name and saves the sysctl values for sb into a
file at some location.

This could be a useful generic way for kernel modules to "remember"
information, or better yet, call arbitrary useful programs upon demand.
For example, make it so that inserting the NFS driver would automatically
load all of the necessary user-space tools, instead of them being loaded
by a script at startup. This way the programs are only run when
necessary.

>
> Stefan
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
>

Greg Zornetzer - gaz+@andrew.cmu.edu
"Light shines brightest in the darkest night"
http://www.contrib.andrew.cmu.edu/~gaz

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu