Computing.Net > Forums > Linux > Automatic running of script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Automatic running of script

Reply to Message Icon

Name: shahzin
Date: June 5, 2005 at 22:04:42 Pacific
OS: Fedora
CPU/Ram: P4/256
Comment:

hello friends,
I have written the script using iptables masquerading for internet. After booting the system I have to run the script explicitly. Where should i put the script so that it can run automatically after booting.

I tried to put in ifcfg-eth0 and ifcfg-eth1 but when network service gets started or restarted all my rules gets flushed.


Thanks


Shahzin



Sponsored Link
Ads by Google

Response Number 1
Name: jboker
Date: June 5, 2005 at 22:15:52 Pacific
Reply:

run the script from /etc/rc.d/rc.local


0

Response Number 2
Name: shahzin
Date: June 6, 2005 at 00:29:05 Pacific
Reply:

thanks john for the response.
it is working

But if i restart network service rules get flushed and i have to re run the script. Is this possible to avoid this so that if i run some service rules doesn't get flushed even if i restart some service

Thanks

Shahzin


0

Response Number 3
Name: 3Dave
Date: June 6, 2005 at 01:38:53 Pacific
Reply:

As you want the script to be run every time your network starts as opposed to when your computer starts you don't want to put it into rc.local (which is like autoexec.bat). I am unfamiliar with Fedora but you need to find what scripts control bringing your network interface up and down. I seem to remember something about /etc/sysconfig/network when I last played with redhat (v5.2!)....


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Automatic running of script

How to run .sh script file? www.computing.net/answers/linux/how-to-run-sh-script-file/23572.html

How to run a script at certain time www.computing.net/answers/linux/how-to-run-a-script-at-certain-time/21824.html

Run CGI scripts on Linux www.computing.net/answers/linux/run-cgi-scripts-on-linux/23374.html