LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 11-03-2002, 05:55 AM   #1
Lost_99
LQ Newbie
 
Registered: Nov 2002
Posts: 4

Rep: Reputation: 0
Help Rc.local


I am trying to add a process on boot using rc.local and it just isn't working.
I put a couple of 'echo' lins in just to see if the file was being processed, where should these lines show up?
I am using RH 7.3 and here is the content of the rc.local at the moment:
echo "Starting Portsentry"
/usr/local/psionic/portsentry/portsentry -tcp
/usr/local/psionic/portsentry/portsentry -udp
echo "Started Successfully"
 
Old 11-03-2002, 06:28 AM   #2
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
I'm guessing they should show up around where you put them in... do you see anything? Maybe you need to have the network up before you can call the portsentry??

You could also try putting them in rcX.d/ directories and see if that works. try putting an executable script like this in /etc/rc.d/rc3.d/

#!/bin/sh
echo "Starting Portsentry"
/usr/local/psionic/portsentry/portsentry -tcp
/usr/local/psionic/portsentry/portsentry -udp
echo "Started Successfully"

and call it SXXportsentry where XX is replaced by a number larger than that for the localnet script (these specify which order the scripts will be called in)
 
Old 11-03-2002, 06:49 AM   #3
Lost_99
LQ Newbie
 
Registered: Nov 2002
Posts: 4

Original Poster
Rep: Reputation: 0
argh

Your suggestion sounded great -
I went to rc3.d to see what S# I should use and low and behold there was an S99local already there which contained exactly those lines ....
I would have thought the 'echo' would show up in a system log somewhere ....???
(yes I using init 3 so that should be the right spot)
I can run portsentry from a command line just fine but I really want it at boot just in case I am not around and the system restarts.
 
Old 11-03-2002, 03:27 PM   #4
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
The 'echo "Starting Portsentry"' should show up when you are switching to runlevel 3, and it it's 99, it'll probably be the last thing you see before you are prompted to logon.

If it's in there, and it is executable, then it should all be executed. try a "ps -A" to see if it is running.
 
Old 11-03-2002, 03:53 PM   #5
Lost_99
LQ Newbie
 
Registered: Nov 2002
Posts: 4

Original Poster
Rep: Reputation: 0
It is definately not running (at least not until I start it manually).
I noted that were actually two S99 files so I renamed one but still no luck.

Nothing in any log files, errors or otherwise. I have been booting remotely so I don't know if there is a message I am missing - guess I will hook up a console and watch it next time.
 
Old 11-03-2002, 04:06 PM   #6
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
are the executables here?:

/usr/local/psionic/portsentry/portsentry

is that exactly what you type in whe you start via command line?

if not, try "whereis portsentry" and see where the binaries are... probably in /usr/local/bin or something.
 
Old 11-03-2002, 04:26 PM   #7
Lost_99
LQ Newbie
 
Registered: Nov 2002
Posts: 4

Original Poster
Rep: Reputation: 0
Yep, that is where they are - for sure. I checked that three times, just in case I had a typo.
 
Old 11-03-2002, 04:35 PM   #8
adam_boz
Member
 
Registered: Jul 2002
Location: Santa Cruz, CA
Distribution: lfs
Posts: 538

Rep: Reputation: 30
I don't know buddy... my last idea is to make sure that the script is executable, and if it points somewhere else, make sure that file is executable.
 
  


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
Setup local machine to allow lan machines to retrieve its local user mail. Brian1 Linux - Networking 3 03-30-2006 05:04 AM
Local webserver -- How to deny all client install their local web server--Please help b:z Linux - Networking 13 04-16-2005 07:11 PM
Regarding rc.local subaruwrx Linux - Newbie 11 10-11-2004 08:04 AM
where's my rc.local TheChicken Linux - Newbie 4 04-05-2004 01:38 PM
Cannot resolve local addresses on local network danielgrenyer Linux - Networking 6 01-14-2004 11:03 AM


All times are GMT -5. The time now is 10:59 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration