From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Taylor Subject: Re: start up script Date: Wed, 12 Feb 2003 07:33:46 -0800 Sender: linux-admin-owner@vger.kernel.org Message-ID: <5.1.1.6.0.20030212072135.00af1e68@mustang> References: <200302111705.21190.unix@amigo.net.gt> Mime-Version: 1.0 Return-path: In-Reply-To: <200302120838.59057.unix@amigo.net.gt> List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" Content-Transfer-Encoding: 7bit To: linux-admin At 06:38 AM 2/12/03, - Luis - wrote: >This is my script: > >#!/bin/bash >/sbin/route add -net 10.3.1.0 netmask 255.255.255.0 gw 10.1.1.250 >/sbin/route add -net 10.4.1.0 netmask 255.255.255.0 gw 10.1.1.250 >/sbin/route add -net 10.8.1.0 netmask 255.255.255.0 gw 10.1.1.250 > >and its place in /etc/rc.d/init.d/routetable and the link its in >/etc/rc.d/rc3.d/S55routetable There is more to writing a startup script than that. >but i run it only executing /etc/rc.d/init.d/routetable as root I don't think it should make a difference at this point, unless your network isn't running by S55. Are you sure you are starting only at run level 3? >how does it work chkconfig? or do i have to place this script in somewhere >else? man chkconfig It's a very handy tool for administering run level services. Didn't you say you were running a RedHat box? Version number would be useful information, however, check to see if you have the file: /etc/sysconfig/static-routes in it, add the line: eth0 net 10.0.0.0 netmask 255.0.0.0 gw 10.1.1.250 >As long as eth0 is the NIC connected to 10.1.1.250 /etc/init.d/network script reads this file for you, and does it in the right place, and the next person to admin this RedHat box will know where to look with out a bunch of fumbling around. Good luck. Scott.