Subject: Re: pcmcia insertion/removal hooks
To: john heasley <current-users@netbsd.org, heas@shrubbery.net>
From: Tero Kivinen <kivinen@ssh.fi>
List: current-users
Date: 06/17/2001 16:59:23
heas@shrubbery.net (john heasley) writes:
> is there a way to hook a script to insertion or removal of a pcmcia
> card ala apmd's resume/suspend scripts? i need a way to put my
> wavelan card into adhoc mode and possibly kick dhclient when the
> card is inserted. such hooks dont appear to exist, short of a
> frequent cron job. freebsd's pccardd has this facility and it usually
> works. :)
I wrote cardwatchd + some kernel patches half a year ago, and I have
been using them daily since. It detects when you insert or remove
pcmcia or cardbus cards, and then cardwatchd will run script
associated with the card type from the /etc/cardwatch directory.
The script I am using automatically detects the network name of the
wlan it is detecting and turns on encryption for my home and office
network (different keys), and tries to talk in clear with all others
etc.
I submitted it as a PR december 07 2000, but haven't heard anything
since. Check out kern/11659, and kern/11694. I have updated version
for the NetBSD-current, and if anybody wants them I can put them
somewhere.
--
kivinen@ssh.fi Work : +358 303 9870
SSH Communications Security http://www.ssh.fi/
SSH IPSEC Toolkit http://www.ssh.fi/ipsec/