From owner-freebsd-mobile Tue Mar 21 22:10:45 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from boreas.isi.edu (boreas.isi.edu [128.9.160.161]) by hub.freebsd.org (Postfix) with ESMTP id B11BF37C0AB for ; Tue, 21 Mar 2000 22:10:42 -0800 (PST) (envelope-from larse@ISI.EDU) Received: from [128.9.176.139] (ras39.isi.edu [128.9.176.139]) by boreas.isi.edu (8.8.7/8.8.6) with ESMTP id WAA17506; Tue, 21 Mar 2000 22:10:32 -0800 (PST) User-Agent: Microsoft Outlook Express Macintosh Edition - 5.01 (1630) Date: Tue, 21 Mar 2000 22:10:35 -0800 Subject: Re: switching between connected/disconnected operation? From: Lars Eggert To: , Cc: Message-ID: In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org These are a beginning, they reconfigure the network link. However, enabling/disabling/reconfiguring other services (nfs, amd, sshd, xntpd, inetd, nis, etc) is more complicated - hence my question. I've found some packages for Linux (netenv and divine, no FreeBSD ports for both of them); however, what they do is probe the net at boot time to configure things - I'd like something that can reconfigure stuff on the fly without rebooting (in addition to doing it at boot time). > I have done EXACTLY this....I use a few scripts called: > > 1) Worklan > > ifconfig ep0 inet 63.227.213.90 netmask 255.255.255.248 > ifconfig ep0 up > route add default 63.227.213.94 > ifconfig -a > > > 2) Homelan > > ifconfig ep0 inet 63.227.213.90 netmask 255.255.255.248 > ifconfig ep0 up > route add default 205.147.64.44 > ifconfig -a > > > 3) Dialup > > ppp -auto cybcon > > > > I put these scripts in /usr/local/sbin, made them executable. Now, when I boot > I use the script I want depending on where I am. Also, need to be root to run > these. chown root && chmod a+s - be sure you understand the security implications of setting the sticky bit. Lars ____________________________________________________________________________ Lars Eggert Information Sciences Institute http://www.isi.edu/~larse/ University of Southern California To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message