From owner-freebsd-mobile Wed Jan 19 9:30:18 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from lunatic.oneinsane.net (lunatic.oneinsane.net [207.113.133.231]) by hub.freebsd.org (Postfix) with ESMTP id 7201B1529D for ; Wed, 19 Jan 2000 09:30:14 -0800 (PST) (envelope-from insane@lunatic.oneinsane.net) Received: by lunatic.oneinsane.net (Postfix, from userid 1000) id 98F2A1AE; Wed, 19 Jan 2000 09:30:12 -0800 (PST) Date: Wed, 19 Jan 2000 09:30:12 -0800 From: Ron 'The InSaNe One' Rosson To: freebsd-mobile@freebsd.org Subject: Re: ppp dialup question + LAN Message-ID: <20000119093012.A42414@lunatic.oneinsane.net> Reply-To: Ron Rosson References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="cWoXeonUoKmBZSoM" X-Mailer: Mutt 1.0i In-Reply-To: ; from freebsd@cybcon.com on Wed, Jan 19, 2000 at 12:10:02AM -0800 X-Operating-System: FreeBSD lunatic.oneinsane.net 3.4-STABLE X-Moon: The Moon is Waxing Gibbous (97% of Full) X-Opinion: What you read here is my IMHO X-Disclaimer: I am a firm believer in RTFM X-WWW: http://www.oneinsane.net X-PGP-KEY: http://www.oneinsane.net/~insane/insane2-pgp5i.txt X-Uptime: 8:52AM up 1 day, 17:19, 1 user, load averages: 0.00, 0.00, 0.00 Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --cWoXeonUoKmBZSoM Content-Type: text/plain; charset=us-ascii You could write a shell/perl script that will initiate your link. I wrote a simple perl script that bring up my laptops ethernet interface with some predetermined services depending on what known network it is on. If I connect to an unknown network w/o dhcp I configure the interface by hand. Here is a short example with out a dhcp server. If you would like to see a copy of my simple perl script that I use just drop me a line. TIA Ron On Wed, 19 Jan 2000, William Woods was heard blurting out: > I have a laptop that uses PPP to connect to the net, but also, when connected > to my LAN uses my other FreeBSD box as a gateway. in rc.conf there is > an entry for defaultrouter="192.168.0.2" when I am on the LAN, what would be an > easy to switch from LAN to ppp dialup without editing rc.conf commenting out > the default router and rebooting ? > > Thanks > > ---------------------------------- > E-Mail: William Woods > Date: 19-Jan-00 > Time: 00:08:04 > > This message was sent by XFMail > ---------------------------------- > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-mobile" in the body of the message -- ------------------------------------------------------------------- Ron Rosson ... and a UNIX user said ... The InSaNe One rm -rf * insane@oneinsane.net and all was /dev/null and *void() ------------------------------------------------------------------- UNIX _is_ user-friendly. It's just not ignorant-friendly and idiot-friendly. Build a system even a fool can use,and only a fool will want to use it. --cWoXeonUoKmBZSoM Content-Type: application/x-sh Content-Disposition: attachment; filename="example.sh" #!/bin/sh # # This is an example script to bring up your link manually on a laptop for # either a LAN or PPP using a modem MYNAME=`basename $0` if [ $# -lt 1 ] ; then /bin/echo "Usage $MYNAME [ dialup lan ]" exit 2 fi if (echo "$1" |grep -c "dialup" -) then /usr/sbin/ppp -auto myisp else /sbin/ifconfig ed0 inet xxx.xxx.xxx.xxx netmask 255.255.255.0 /sbin/route add default xxx.xxx.xxx.xxx fi --cWoXeonUoKmBZSoM-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message