Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

share|improve this question
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 Answer 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

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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