-   Linux - Software (
-   -   Running a process during boot (

anegbi 11-29-2005 03:44 AM

Running a process during boot
Hi all,

I'm using a 2.4.26 Linux kernel and a rad-hat red-hat based custom distribution as an operating system for a controller.

I developed a software to run over the controller and to perform some activities with the controller resources.

How can I configure the Linux to run my software during the boot process?
I other words: I want this software to run right after (or during) the boot process without the need of any manual interference.


grimse 11-29-2005 04:08 AM

hi anegbi,
eigther you can write a little startup-script, place it in /etc/init.d and link it to the run-level, where it should be strarted (/etc/rc3.d/ or /etc/rc5.d/) or simply add the start-command in /etc/rc.d/rc.local.

greetings, grim

sundialsvcs 11-29-2005 03:53 PM

Each time Linux starts up, it runs one process: init. That process refers to /etc/inittab to tell it what to do for the current "runlevel," normally "5." (See man init, et al.)

And that usually consists of an instruction to run all of the "Snn.." files found in /etc/rc.d/rcn.d, where "n"=the current runlevel. (On boot, it runs "sysinit" first.) It runs the files in ascending order: hence the two-digit numbers in the names, used to enforce the order. You'll notice that each one of these files is a symlink, or alias, to files in /etc/init.d. (Whew!)

The "K..." files are used to close things down when switching runlevels: "K" is for "Kill." (So saith the author Sue Grafton.)

So, that's the mechanism that you will use.

anegbi 11-30-2005 04:08 AM

Thanks for the info folks, BUT - I need my process to run without interfere the boot process - my process, as an embedded process, is endless!
Currently, if I'm running it before the boot process ends if prevents the boot from ending.

All times are GMT -5. The time now is 09:19 PM.