Hello, I know this has been asked a bazillion times and I did several searches to that effect but I'm still foggy (hence why I'm posting in Newbie).
I'm running a server with Ubuntu Edgy (6.10).
I need to add two things to the startup sequence so that I don't have to do it manually every time the power goes off or the server gets rebooted.
1. Run my firewall script, located in /etc/init.d
2. Start the "pon" internet connection.
It absolutely MUST be in that order, if I start the connection first then run the firewall, none of the clients can connect. In fact, I would like to ensure it is done correctly by first running poff then pon again.
By searching LQ I have discovered the following things.
- that I must determine my runlevel (which is 2)
- that I must link my script in the /etc/rc2.d directory
- I must use the "man" command to determine how to do this exactly
- I must read the README file that is included in the rc2.d directory
So the readme has me all confused.
It seems to suggest that you can only run scripts that are in the specific /etc/init.d directory
The scripts are all symbolic links whose targets are located in /etc/init.d/ .
I was all proud of myself for figuring out how to do my startup sequence without any help, but alas. It was not to be.
I need to start the pon program which is in /usr/bin and not in /etc/init.d - so how do I do this?
Additionally, how can I make sure pon is not already running, and if it is, disable it using poff, then run the firewall script, then run pon? I tried putting a link in my /etc/rc2.d that starts with K but it involves complicated math and I don't think it would work anyway seeing as how poff is located in /usr/bin as well.