Executing commands on startup
OK. Long story...
My computer came fitted with a WinModem, the Intel-v92-Ham. Normally unusable under linux, but fortunately some nice people at Intel made some drivers for it, which SuSE packaged with their distro and I installed The driver consists of two kernel modules, hamcore.o and ham.o. both must be loaded for the modem to work. The device file is /dev/ham When I start WVDial (or any other dialer) to connect to the net, there is a long pause and plenty of CPU/Hard disc activity. Then WVDial says 'cannot use /dev/ham, device not recognised'. In the error log, I have 'insmod: install block-major-hamcore failed' However, when I (as root) I say: #modprobe hamcore #modprobe ham WVDial works fine, there is no pause before the modem starts up and all is nice. There is a script with the driver, called hamboot. This is supposed to load the two modules at boot time, but it doesn't Now, although I can cope with loading the modules by hand every time I connect, I really want to do it automatically or at boot time. Any ideas? |
Sure, you could place them into your modules.conf file in /etc/modules.conf
|
Or, if that doesn't work, you could put it in the boot script:
/etc/rc.d modprobe hamcore modprobe ham |
Just reading the man page here about insmod actually sounds like maybe the command you are looking for. It sounds like it "installs" the modules rather than just probing them?
|
That's good, I didn't realize that I could just sit the commands at the bottom of the script and they would execute. I somehow presumed boot scripts to be much more complex.
I have tried insmod, but don't understand what it does. It seems to have exactly the same effect as modprobe. The modules unload again after reboot. |
so you know, that script you have that came with the drivers might need to be setup in the /etc/init.d directory, with the proper symlinks from /etc/rc.d/rc3.d in order to work (but I dunno for sure - I haven't used this stuff).
PS - I think modprobe actually does call insmod. It's kind of a wrapper that loads dependent modules in additon to the one you specify as an argument to modprobe on the command line. |
All times are GMT -5. The time now is 06:10 PM. |