From owner-freebsd-net Sat May 25 10:37:42 2002 Delivered-To: freebsd-net@freebsd.org Received: from mighty.grot.org (mighty.grot.org [204.182.56.120]) by hub.freebsd.org (Postfix) with ESMTP id 18E1B37B40A for ; Sat, 25 May 2002 10:37:33 -0700 (PDT) Received: by mighty.grot.org (Postfix, from userid 515) id E57E55EA9; Sat, 25 May 2002 10:37:26 -0700 (PDT) Date: Sat, 25 May 2002 10:37:26 -0700 From: Aditya To: Vinod Cc: freebsd-net@freebsd.org Subject: Re: ifconfig and route in a shell script Message-ID: <20020525173726.GA12379@mighty.grot.org> Reply-To: Aditya References: <20020525163617.42919.qmail@web21109.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020525163617.42919.qmail@web21109.mail.yahoo.com> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org your default gateway should be on a directly connected network; 10.0.2.1 is not in 10.0.1.0/24 and so your machine doesn't know how to get to it -- your default gateway needs to be of the form 10.0.1.x, probably 10.0.1.1 Aditya On Sat, May 25, 2002 at 09:36:17AM -0700, Vinod wrote: > i had some problems with a script of mine. > > #!/bin/sh > ifconfig wi0 10.0.1.5 netmask 255.255.255.0 > route delete default > route add default 10.0.2.1 > > > > > i get a host 10.0.2.1 unreachable message when i run > this script.then i put the ifconfig in a seperate > script and ran it first and then the route commands in > a seperate script.this works.so my guess is there is > some timing issue between these two commands.i tried > putting an echo between the ifconfig and route > commands(to make a slight delay) but that didnt > work.any other suggestions? > will putting a delay work?if yes,can anyone tell me > how i can do that on a script.i am new to writing > shell scripts.i am using csh. > > __________________________________________________ > Do You Yahoo!? > Yahoo! - Official partner of 2002 FIFA World Cup > http://fifaworldcup.yahoo.com > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message