LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-10-2006, 09:04 AM   #1
Filipe
LQ Newbie
 
Registered: Dec 2005
Posts: 23

Rep: Reputation: 15
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.)
 
Old 07-10-2006, 09:43 AM   #2
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300

Rep: Reputation: 90
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.
 
Old 07-10-2006, 09:56 AM   #3
Filipe
LQ Newbie
 
Registered: Dec 2005
Posts: 23

Original Poster
Rep: Reputation: 15
I am booting into CLI
and i have:

linux0 Login:
trcfile teste1
logfile teste2


To obtain the login prompt i have to
tap "enter".
 
Old 07-11-2006, 03:48 AM   #4
Filipe
LQ Newbie
 
Registered: Dec 2005
Posts: 23

Original Poster
Rep: Reputation: 15
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...
 
Old 07-11-2006, 06:49 AM   #5
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300

Rep: Reputation: 90
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.
 
Old 07-11-2006, 07:48 AM   #6
Filipe
LQ Newbie
 
Registered: Dec 2005
Posts: 23

Original Poster
Rep: Reputation: 15
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...
 
Old 07-11-2006, 09:06 AM   #7
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300

Rep: Reputation: 90
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.
 
Old 07-11-2006, 11:56 AM   #8
Filipe
LQ Newbie
 
Registered: Dec 2005
Posts: 23

Original Poster
Rep: Reputation: 15
The scrip just monitors conections to a router:
-write to a tracefile

the script works well wen i call it from prompt.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mandriva startup scripts (need to add something to startup before X starts) thunderweasel Mandriva 3 01-01-2006 12:55 AM
Startup scripts simcox1 Slackware 7 12-05-2005 05:04 PM
startup scripts... ValidiusMaximus Linux - Software 8 01-11-2005 05:55 PM
startup scripts amphion Linux - Newbie 8 03-28-2003 01:39 PM
X Startup Scripts JHuizingh Linux - General 1 09-18-2001 01:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration