Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Apr 2001 08:21:28 -0700
From:      Lars Eggert <larse@ISI.EDU>
To:        Robert =?iso-8859-1?Q?Blacqui=E8re?= <freebsd@guldan.demon.nl>
Cc:        freebsd-mobile@freebsd.org
Subject:   Re: pccard startup scripts
Message-ID:  <3ACB3BF8.C145CEFE@isi.edu>
References:  <20010404140932.A48567@thorin.guldan.demon.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a cryptographically signed message in MIME format.

--------------ms5CECB21D28A49B9A41BEDB28
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Robert Blacquière wrote:
> 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
> 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.

We have a similar set of scripts, that work a little differently: We have a
hierarchy of subdirectories under /etc/locations, e.g.

/etc/locations
	/etc/locations/128.9.160.161
	/etc/locations/128.9.144.145
	/etc/locations/disconnected

Those subdirectories contain overrides for files under /etc that will be
linked in place for that particular location during startup (or a manually
triggerd "switch-location" event). 

The fun part is how we detect locations: the name of the subdirectories
under /etc/locations are the IP addresses of well-known hosts (routers, in
this example) at the respective location. We use the arping tool from ports
to generate ARP requests out of all interfaces for any of these addresses.
The first one to succeed gives you which location you're at.
("Disconnected" is the fallback if none succeeds.)

The benefit of our scheme (in my opinion) is that you can use the same card
at multiple locations. And you don't have to manually specify which
location you're at.

If there's interest, I can clean them up and make them available...
-- 
Lars Eggert <larse@isi.edu>                 Information Sciences Institute
http://www.isi.edu/larse/                University of Southern California
--------------ms5CECB21D28A49B9A41BEDB28
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME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WG+Z31AG70
HQfOnZ6CYynvkwl+Vd4xggH3MIIB8wIBATCBnDCBlDELMAkGA1UEBhMCWkExFTATBgNVBAgT
DFdlc3Rlcm4gQ2FwZTEUMBIGA1UEBxMLRHVyYmFudmlsbGUxDzANBgNVBAoTBlRoYXd0ZTEd
MBsGA1UECxMUQ2VydGlmaWNhdGUgU2VydmljZXMxKDAmBgNVBAMTH1BlcnNvbmFsIEZyZWVt
YWlsIFJTQSAxOTk5LjkuMTYCAwMjBTAJBgUrDgMCGgUAoIGxMBgGCSqGSIb3DQEJAzELBgkq
hkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTAxMDQwNDE1MjEyOFowIwYJKoZIhvcNAQkEMRYE
FDr2x3T+aZfLKsHif39qWvR5ND0gMFIGCSqGSIb3DQEJDzFFMEMwCgYIKoZIhvcNAwcwDgYI
KoZIhvcNAwICAgCAMAcGBSsOAwIHMA0GCCqGSIb3DQMCAgFAMA0GCCqGSIb3DQMCAgEoMA0G
CSqGSIb3DQEBAQUABIGAZO0V/Exd76+nUN5LUZLqVG+TT0nCjGuwiy9ciN2dXoX3MrymdG1X
AOy7RrzEZ78Vfl+9tOcL7cvFx/9JmKaY9hxeo9dkCCpj96dZBJNv9+96pEXXXPGAO+19Nok9
pnk0ZDV7hHut0mhTOYFa11f8VR61x0BkS855i84EcNTiXHs=
--------------ms5CECB21D28A49B9A41BEDB28--


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3ACB3BF8.C145CEFE>