add some command when booting
I would like to add the following two commands during booting:
ifconfig eth0 192.168.0.12 route add default gw 192.168.0.1 Where can I add it? ================================================== I tried putting it in .bashrc but the problem is .bashrc reruns everytime when you open a terminal window. And "route add default gw 192.168.0.1" will display a warning if default route already setup. So I have to either add the two commends in booting or in the .bashrc find if the file already exist ... Which file does it store when running "route add default gw 192.168.0.1"? |
What distro are you using, why don't you use the
distribution-provided methods for bringing up the ethernet interfaces ... ? Cheers, Tink |
redhat 9.0
isn't there a common way to add it? like add those 2 line to somewhere in the bootu process that would work for all distro? |
Quote:
In slack you could add commands in the /etc/rc.d/rc.local file. I don't think that file exists in Red hat. |
RH does have a rc.local ...
but really it's a system service that should be set-up using either RH tools or at least in /etc/sysconfig/network ... Cheers, Tink |
All times are GMT -5. The time now is 01:57 PM. |