-   Linux - Newbie (
-   -   Help Rc.local (

Lost_99 11-03-2002 06:55 AM

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"

adam_boz 11-03-2002 07:28 AM

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/

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)

Lost_99 11-03-2002 07:49 AM

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.

adam_boz 11-03-2002 04:27 PM

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.

Lost_99 11-03-2002 04:53 PM

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.

adam_boz 11-03-2002 05:06 PM

are the executables here?:


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.

Lost_99 11-03-2002 05:26 PM

Yep, that is where they are - for sure. I checked that three times, just in case I had a typo.

adam_boz 11-03-2002 05:35 PM

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.

All times are GMT -5. The time now is 06:15 PM.