Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 May 2002 14:01:35 -0700 (PDT)
From:      Annelise Anderson <andrsn@andrsn.stanford.edu>
To:        Vinod <geekvinod@yahoo.com>
Cc:        freebsd-newbies@FreeBSD.ORG, freebsd-net@FreeBSD.ORG
Subject:   Re: setting up batch files
Message-ID:  <Pine.BSF.4.10.10205241358550.40083-100000@andrsn.stanford.edu>
In-Reply-To: <20020524203214.30158.qmail@web21101.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 24 May 2002, Vinod wrote:

> whats the best way to execute a series of commands in
> freebsd?something like a batch file in MS-DOS.
> 
> suppose i want to execute the two commands,
> defaultrouter="a.b.c.d"
> ifconfig_eth0="inet e.f.g.h netmask e.f.g.h"
> by typing something like 'change' on the terminal
> window;howdo i go about this?
> note these two commands are set in /etc/rc.conf and i
> want to execute the changes through a batch sort of
> file.
> Thanks in advance,
> vinod
> 
> __________________________________________________
> Do You Yahoo!?
> LAUNCH - Your Yahoo! Music Experience
> http://launch.yahoo.com
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-newbies" in the body of the message
> 
You use a shell script; put the commands in the script as you would
type them at the command line; make the shell script executable; 
run it.

The commands aren't really set in /etc/rc.conf; only the values of
the variables are set there.  /etc/rc and scripts it calls actually
run the commands.  So if you don't want to reboot, do it at the
command line or do a shell script.

	Annelise
-- 
Annelise Anderson
Author of: 		 FreeBSD: An Open-Source Operating System for Your PC
Available from:	 BSDmall.com and amazon.com
Book Website:    http://www.bittreepress.com/FreeBSD/introbook/	




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10205241358550.40083-100000>