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" |
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) |
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. |
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. |
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. |
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. |
Yep, that is where they are - for sure. I checked that three times, just in case I had a typo.
|
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 01:36 AM. |