You could add the following to /etc/rc.d/rc.local
/sbin/route add -host <IP address> eth0:0
Or, if you wish more control over the process you could
create and edit the file /etc/rc.d/init.d/network.local
as shown below:
#!/bin/sh
#
# /etc/rc.d/init.d/network.local
#
# Define a default (static) route to a gateway
#
case "$1" in
'start')
/etc/route add default <IP Address>
;;
'stop')
/etc/route delete default <IP Address>
;;
*)
echo "usage: $0 {start | stop}"
;;
esac
Set the perms to 755 and create the softlinks in the
startup (/etc/rc.d/rc2.d) and the shutdown script
directories (/etc/rc.d/rc0.d):
% cd /etc/rc.d/rc2.d
% ln -s ../../init.d/network.local S31network
% cd ../rc.d/rc0.d
% ln -s ../../init.d/network.local K39network
Hope that helps.
Brandon Wheaton
UNIX Systems Engineer
ValiCert, Inc.
1215 Terra Bella Ave.
Mountain View, CA 94043
650.567.5430
----
Computers are useless; they can only provide answers.
~Pablo Picasso
-----Original Message-----
From: Adam Williams [mailto:adam@xxxxxxxxxxxxxx]
Sent: Friday, May 26, 2000 12:39 PM
To: cobalt-users@xxxxxxxxxxxxxxx
Subject: Re: [cobalt-users] Need 2 run command @ startup
/etc/rc.d/rc.local
Adam
Respect my .Xauthoritah!
_____________________________________________________________
|Adam Williams adam@xxxxxxxxxx |
|Network Administrator Vicksburg Chemical Company |
-------------------------------------------------------------
On Fri, 26 May 2000, John Navarro wrote:
> I need to issue a 'route add' during/after the system boots. I can't
> figure out where to put my 'route add'. Does anyone know of a good
> place to issue my command?
>
> Thanks,
>
> John
Attachment:
smime.p7s
Description: S/MIME cryptographic signature