[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Running Scripts
I am new to Linux and have a question for those of you who do scripting.
I am running Red Hat Linux 7.1... This machine is on my home network
connected to the internet. Also on the network is an NT machine, a 2000
advanced server machine, and two windows 2000 workstations.
The Linux machine is acting as the gateway to get the other machines on
the internet.
In order to make this happen, I am typing the following lines every time
linux boots.
/sbin/ipchains -A forward 207.0.0.0/8 -j MASQ
Then I get a message that I have to type the following line, so I type
it:
echo 1 > /proc/sys/net/ipv4/ip_forward
This works perfectly, but I want to make it into a script that runs at
startup. I tried making a manual script with the text editor called
"myscript" that is stored at /etc/myscript (with permissions)
All I am putting in the text file are these 2 lines. When I type
/etc/myscript at the command prompt, I do not get an error, but it is
almost as if the script never did execute. If I reboot and type these 2
lines manually, the internet forwarding (masquerade) works perfectly.
I have attempted to look at the how to's but I am obviously doing
something wrong. I figured if I could just get myscript to run
manually, then I would worry about seeing how to add the script to
execute at login.
Thanks,
Ricky Bryce
-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.