3

I'm trying to load a program I wrote at boot. The program is also a module.ko and a small bash script. For the module I tried doing depmod mymodule.ko and modprobe -a and messing around with modprob libaries and .conf files without any success.

So, I wrapped it all (module and my executed program) in a bash script. I tried to load it at boot with rc.d. I failed this one too cause I think rc.d runs only executed files and not bash. If I'm right how do I change my bash file to an executed one? And install it in rc.d too? Is my strategy right?

Thank you all in advance :)

*working on Linux CentOS

  • 1
    There are parts of your question I don't understand. Your basic strategy is right, but obviously you didn't implement it correctly, and your description is too vague to understand what you did wrong. Try posting the exact commands you tried and any error message you got (use copy-paste). – Gilles Feb 13 '11 at 15:41
1

For your module, normally you'd normally put that in /etc/modprobe.conf but you can also put it in /etc/rc.modules.

For your script, if you want to just execute it once when the server boots, it can be put in /etc/rc.d/rc.local (although it is also executed when changing run levels). If you're looking for a more complex service you can start and stop or run at various run levels, you want a System V Init script

  • thanks... first start with the module how do I do it exactly in modprobe.conf , I wortel "alias name mymodulename" whats the meaning of doing soo? where do I need toput my .ko file? – azulay7 Feb 19 '11 at 9:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.