[Nottingham] RE: FC2 and slmodem
Richard Cohen
nottlug at daijobu.co.uk
Sun Sep 12 10:34:52 BST 2004
Craig Lynch wrote:
> How can I insert a custom kernel module at startup?
> The module in question is slamr (part of the slmodemd package).
> I've managed to get the service that is provided with it to run, but I
> have to insert the module manually and then restart the service
> everytime I startup the computer.
>
I'm using slamr (version 2.9.9) on Debian - and it works very well -
let's hope FC2 is sufficiently similar. slmodemd comes with sample init
scripts for Debian and SUSE, but using rc.local is straightforward.
> All that I've gathered so far is that I can get commands to run at
> startup by putting them into the rc.local script. I have tried using
> "modprobe slamr" in here, but I get a bunch of errors in the sytem log
The 'errors' are perfectly normal and indicate that the module has
loaded (don't worry about the 'tainted' message - just don't expect to
get much help from the kernel developers). Now you just need to run the
slmodemd service. For example, I have in /etc/init.d/local
echo -n "Loading modem driver"
modprobe slamr
slmodemd -g dialout -c UK&
echo "."
> and the module fails to remain.
What do you mean by this? Try the following command:
lsmod | grep slamr
You should get something like:
slamr 377156 2
> I've noticed a file called modprobe.conf with commands like this in:
There's no need to edit this. I'll try to explain what these mean, anyway.
> alias snd-card-0 snd-trident
When you (or ALSA) tries to
# modprobe snd-card-0
(ie load the module for the first sound card), the module utilities will
instead do
# modprobe snd-trident
> install snd-trident /sbin/modprobe --ignore-install snd-trident &&
> /usr/sbin/alsactl restore >/dev/null 2>&1 || :
... and then use alsactl to load the mixer settings (ALSA always
initializes the volume to zero)
> remove snd-trident { /usr/sbin/alsactl store >/dev/null 2>&1 || : ; };
> /sbin/modprobe -r --ignore-remove snd-trident
... and when you try to unload it. eg
# modprobe -r snd-card-0
use alsactl to save the mixer settings
> Would I do something similar for slamr?
> The hardware name is another thing I'm unsure of. I've used dmesg to get
> this info about the linmodem.
> ... <output of lspci -vv snipped> ...
There's no need. It's simpler to just load everything manually in
rc.local. You *can* use the 'hotplug' subsystem to load modules
depending on the hardware that is present. If you did add something to
/etc/modprobe.conf it would might look something like (probably
incomplete, definitely untested)
alias modem slamr
install slamr modprobe slamr && slmodemd
remove slamr killall slmodemd; modprobe -r slamr
and maybe (for automatic loading when /dev/ttySL0 is opened)
alias char-major-212 slamr
[Debian would make this a file in /etc/modprobe.d/ rather than part of
/etc/modprobe.conf]
Hope this helps,
Richard.
More information about the Nottingham
mailing list