Date: Wed, 4 Apr 2001 16:49:58 +0200 From: =?iso-8859-1?Q?Robert_Blacqui=E8re?= <freebsd@guldan.demon.nl> To: "Ron 'The InSaNe One' Rosson" <insane@lunatic.oneinsane.net>, freebsd-mobile@freebsd.org Subject: Re: pccard startup scripts Message-ID: <20010404164958.B51040@thorin.guldan.demon.nl> In-Reply-To: <20010404071543.B19882@lunatic.oneinsane.net>; from insane@lunatic.oneinsane.net on Wed, Apr 04, 2001 at 07:15:43AM -0700 References: <20010404140932.A48567@thorin.guldan.demon.nl> <200104041252.f34CqHP42603@bunrab.catwhisker.org> <20010404071543.B19882@lunatic.oneinsane.net>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] Hi I wrote some scripts like that already but looked at the pcmcia stuff from linux -pcmcia-cs which has multiple configs possible. It is depended of the current scheme, which driver loaded and the MAC address of the netowrk adaptor. I creates the recolv.conf, it executes a extrenal script and does the networking stuf like interface and routing. DHCP, static and have multiple settings. With a quick look at your scripts it has serveral config scripts and i have only one config script pccard.opts where all the setting are stored Robert On Wed, Apr 04, 2001 at 07:15:43AM -0700, Ron 'The InSaNe One' Rosson wrote: > 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?= <freebsd@guldan.demon.nl> > > > > >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!" -- Microsoft: Where do you want to go today? Linux: Where do you want to go tomorrow? FreeBSD: Are you guys coming or what? OpenBSD: He guys you left some holes out there! [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjrLNJUACgkQ1ODVtOXCG4imTgCghskEuMLfXLe4q+C9iBSjI1qh vcwAoKoL/kkdqLzvqfXWhdzoJ1xDFaba =cGgb -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010404164958.B51040>
