From owner-freebsd-mobile Thu Apr 5 14:39:43 2001 Delivered-To: freebsd-mobile@freebsd.org Received: from lunatic.oneinsane.net (lunatic.oneinsane.net [66.42.61.27]) by hub.freebsd.org (Postfix) with ESMTP id 544F037B506 for ; Thu, 5 Apr 2001 14:39:30 -0700 (PDT) (envelope-from insane@lunatic.oneinsane.net) Received: by lunatic.oneinsane.net (Postfix, from userid 1000) id 7872A1555C; Wed, 4 Apr 2001 07:15:43 -0700 (PDT) Date: Wed, 4 Apr 2001 07:15:43 -0700 From: Ron 'The InSaNe One' Rosson To: freebsd-mobile@freebsd.org Cc: david@catwhisker.org, freebsd@guldan.demon.nl Subject: Re: pccard startup scripts Message-ID: <20010404071543.B19882@lunatic.oneinsane.net> Reply-To: Ron Rosson Mail-Followup-To: freebsd-mobile@freebsd.org, david@catwhisker.org, freebsd@guldan.demon.nl References: <20010404140932.A48567@thorin.guldan.demon.nl> <200104041252.f34CqHP42603@bunrab.catwhisker.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200104041252.f34CqHP42603@bunrab.catwhisker.org>; from david@catwhisker.org on Wed, Apr 04, 2001 at 05:52:17AM -0700 X-Operating-System: FreeBSD lunatic.oneinsane.net 4.2-STABLE X-Moon: The Moon is Waxing Gibbous (84% of Full) X-Opinion: What you read here is my IMHO X-WWW: http://www.oneinsane.net X-GPG-FINGERPRINT: 3F11 DB43 F080 C037 96F0 F8D3 5BD2 652B 171C 86DB X-Uptime: 7:12AM up 15 days, 11:41, 3 users, load averages: 0.01, 0.04, 0.00 Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Take a look at this.. It might give you some ideas. I use it for my laptop for booting at multiple locations without having to do a reboot. http://www.sdbug.org/utilities.php Look at Pccard-site TIA David Wolfskill (david@catwhisker.org) wrote: > >Date: Wed, 4 Apr 2001 14:09:32 +0200 > >From: =?iso-8859-1?Q?Robert_Blacqui=E8re?= > > >I made some scripts for pccard as replacement for > >the pccard_ether scripts. It has some of the features > >of the linux-pcmcia-cs software. It supports now different > >network settings (easily switchable). Using a single=20 > >config script in which is defined the network settings for > >different locations and different network cards. The config > >depends on the scheme, driver loaded and the mac address of > >the inserted pccard. Before you insert the pccard you tell > >the system which scheme to use. And then you can insert the > >pccard and all settings will be made according to the config. > > That sounds as if it is a step toward addressing a problem I had, and > which I approached in a different way. > > The problem was setting my 802.11b PCMCIA card for whatever network I > happened to be wanting to use at the time -- work, home, a conference... > whatever. > > One of my colleagues used a script where he would identify the network > to use; this appears to be similar to the approach you took. It seemed > to me, though, that this would, at best, be awkward for me: During > system start-up, I would think it would be difficult to engage in a > dialog; besides, I fire up xdm fairly early. > > So I used a hint from another colleague, who had a script that would try > various settings until it found a setting that allowed it to sync up. > > I cobbled up a bit of Perl that uses a couple of RDB-style "databases" > -- one to tell it about the characteristics of a given "location" (use > infrastructure or ad-hoc mode; what SSID to use; WEP key...), and the > other to define how to change the settings and examine the results based > on which kind of card (driver) is being used. (I have subsequently > modified it a bit further to allow for the use of "ifconfig" for these, > using Brooks Davis' recent patches to ifconfig, and I've been using this > successfully both in -STABLE and in -CURRENT.) > > But the basic issue was how to pass control to the Perl script. > > I found a couple of places to do this, and I'm not very happy with > either one: > > * In the card-specific stanza for /etc/pccard.conf, for an "insert" > action, like this: > > insert /usr/local/sbin/pccard_hook -i $device > > This works, but using it means that I need to have my own stanza in > /etc/pccard.conf, rather than just using the one in /etc/defaults. > Indeed, except for this, I don't even need my own /etc/pccard.conf. > > * Hacking /etc/pccard_ether, as the first action in the "start" case: > > if [ -x /usr/local/sbin/pccard_hook ]; then > /usr/local/sbin/pccard_hook -i ${interface} > fi > > I don't mind this quite as much, though it seems that the function -- > providing an installation-specific "hook" for doing idiosyncratic > things -- ought to be integrated rather more cleanly than what I did. > -- ------------------------------------------------------------------------------ Ron Rosson ... and a UNIX user said ... The InSaNe One rm -rf * insane@oneinsane.net and all was /dev/null and *void() ------------------------------------------------------------------------------ I believe the technical term is "Oops!" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message