Howto start script at boot ?
Hi,
I have a SuSE 9.3 Prof. install and have my own firewall script, therefore i have disabled SuSEFirewall2. What i would like to do at bootime is check if my network, dhcp and Samba is up and running and then start my firewall script. I have my script in /etc/init.d and added my firewall script with Yast2 (start at runlevel 3 wich is my default runlevel), but my firewall script is always executed before my network, dhcp and Samba is up and therefore i always need to start my firewall script manually after i have logged in. Can someone help me out please? Thanks. Jimmy |
Is there a boot.local file in init.d? i think (though may be wrong) that the contents of this get executed at the required time.
|
Put a symbolic link from /etc/rc3.d (for runlevel 3 - if not change the 3 to 1, 2, 4 or 5) to your script in /etc/init.d. The name of the link should begin with S (upper case) followed by 2 numbers. The scripts are executed in the order of the names of the links, so S50xyz will run before S51abc.
I am not familiar with SuSE, so Yast2 may already have put a link there, in which case you probably just need to rename it. |
Hi all,
Sorry for the late response but i was ill :-( I tried your suggestions but with no luck, however i have found a nice solution that works for me. After some searching on internet i found some more info and have written a little script to check if network is up and then start my firewall. Here's my script : Code:
#! /bin/sh and not really a executable. Cheers Jimmy |
All times are GMT -5. The time now is 09:33 AM. |