LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Startup - own scripts (https://www.linuxquestions.org/questions/linux-newbie-8/startup-own-scripts-462609/)

Filipe 07-10-2006 09:04 AM

Startup - own scripts
 
I would like to run at startup:

1 deamon_x
and
1 shell script (xpto.sh)


For the 1st case do i have to put it inside rc.local ?
or "chkconfig --add deamon_x ?

For the 2nd case i put the line "xpto.sh &"
inside rc.local but this command gives me no linux user prompt, after the machine starts.
(i tested the script before and is o.k.)

masonm 07-10-2006 09:43 AM

I would think starting the daemon from rc.local would be the way to go.

As for the shell script, what do you mean it doesn't give you a prompt? Are you booting into CLI or X? What sort of prompt are you looking for? Remember, you have to log in before doing any work which could be where you're problem is coming from if I am understanding this correctly.

Filipe 07-10-2006 09:56 AM

I am booting into CLI
and i have:

linux0 Login:
trcfile teste1
logfile teste2


To obtain the login prompt i have to
tap "enter".

Filipe 07-11-2006 03:48 AM

For the 1st case the solution is here:
http://www.linux.com/article.pl?sid=05/08/02/1821218


For the 2nd case stil no clue...

masonm 07-11-2006 06:49 AM

Ok, so you havre to hit the enter key in order to see your log in prompt. I don't know what your shell script is supposed to be doing but I suspect it's the "&". Try removing it and see if that corrects the problem.

Filipe 07-11-2006 07:48 AM

If i remove " &", the shell script does not run in background, so removing it i cant have log in prompt - even hitting the enter key...

masonm 07-11-2006 09:06 AM

Ok, what exactly does this cript do? Perhaps there's a problem in that script that only shows when called during boot? Some scripts are just not going to work properly if executed prior to logging in.

Filipe 07-11-2006 11:56 AM

The scrip just monitors conections to a router:
-write to a tracefile

the script works well wen i call it from prompt.


All times are GMT -5. The time now is 08:39 PM.