Results 1 to 3 of 3
Hi all,
Suse 10
I wrote a firewall that I use for my server but I want to get it to run on runlevel 3 and 5.
There is a ...
- 11-20-2007 #1
startup script howto
Hi all,
Suse 10
I wrote a firewall that I use for my server but I want to get it to run on runlevel 3 and 5.
There is a skeleton script in the /ect/init.d folder but I am not quite sure I get it all.
Forgetting the "pretty stuff" right now of all the configuration notes and such, How would I go about running my script? I normally just got to shell and sh ./myfw start. I have tried a few variations of the script, placed it in rc3.d and rc5.d with something like S15MyFirewall but nothing happens from there.
Odd, it just hit me, does Suse use a different directory to boot the machine? As I am writing this I seem to recall there being a different location for the actual Suse scripts but this was kept for compatibility if needed. I have to go check that out now but any other help would really be great.
Thanks
Kumado
- 11-20-2007 #2Linux Guru
- Join Date
- Nov 2007
- Posts
- 1,695
Init scripts are typically located in /etc/init.d. Create a link in the run level folder that corresponds to the run level the script should be run.
Scripts that run at startup start with capital S, scripts that run when leaving a run level start with capital K. Lowercase letters are ignored and are a good way to "turn off" a script.
As long as the script name and the link name match, chkconfig will also show this "service" in chkconfig -l.Code:cp firewall_start.sh /etc/init.d/ chmod 755 /etc/init.d/firewall_start.sh cd /etc/init.d/rc3.d ln -s ../firewall_start.sh S15firewall_start.sh
- 11-21-2007 #3
Thank you very much.
I will be setting it up right away.
I kept looking at the skeleton script and other how they do so many tests and doing rc_reset and rc_exit.
I found it was in init.d where as it might have been in rc.d so at least I was in the right place.
Thanks again
kumado


Reply With Quote