From owner-freebsd-mobile Thu Aug 2 10:46:42 2001 Delivered-To: freebsd-mobile@freebsd.org Received: from moek.pir.net (moek.pir.net [130.64.1.215]) by hub.freebsd.org (Postfix) with ESMTP id A951237B401 for ; Thu, 2 Aug 2001 10:46:38 -0700 (PDT) (envelope-from pir@pir.net) Received: from pir by moek.pir.net with local (Exim) id 15SMYP-0001bX-00 for mobile@FreeBSD.ORG; Thu, 02 Aug 2001 13:46:37 -0400 Date: Thu, 2 Aug 2001 13:46:37 -0400 From: Peter Radcliffe To: mobile@FreeBSD.ORG Subject: Re: setting keys : pccard.conf or dhclient-exit-hooks Message-ID: <20010802134637.A4524@pir.net> Reply-To: mobile@freebsd.org Mail-Followup-To: mobile@FreeBSD.ORG References: <200108021538.f72FcQt76326@lists.unixathome.org> <200108021605.f72G5jm04084@ptavv.es.net> <200108021724.f72HOUt77757@lists.unixathome.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200108021724.f72HOUt77757@lists.unixathome.org>; from dan@langille.org on Thu, Aug 02, 2001 at 01:24:28PM -0400 X-fish: < Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Dan Langille probably said: > > > > I don't do either any more. I use the /etc/start_if.wi0 file to set my > > > > key and enable it. I find this a bit cleaner than the pccard.conf route > > > > (which I used before start_if was added). But they are functionally > > > > identical. I don't like putting it in the client_hooks as I don't > > > > really believe that this is a function related to DHCP. > > > > > > Ahh, then which of the following entries in my /etc/pccard.conf should > > > also go there? > > > > > > config 0x1 "wi" 5 > > > insert /etc/pccard_ether $device start > > > insert wicontrol -i $device -p 3 > > > remove /etc/pccard_ether $device stop > > > > I try to leave my pccard.conf file alone and the only thing in it at > > present is the irq line (since most of the IRQs listed in the defaults > > file are used on my laptop). Here is my complete and untouched > > /etc/pcard.conf file: > > irq 7 9 I very much agree with leaving pccard.conf entries alone. It means you can get new entries without messing with anything. > > My start_if.wi0 file consists of: > > wicontrol -i wi0 -k 0x0123456789 > > wicontrol -i wi0 -e 1 and for a few small changes, start_if. is not a bad solution. Personally, I mess with pccard_ether, but it's not perfect and isn't the nicest way to do it, but I want to do a lot more than just set a key. I'd recommend -STABLE (or 4.4-R when it comes out) and using the newer ifconfig interface to setting keys. It's more portable and faster. > [dan@xeon:/etc] $ more start_if.wi0 > wicontrol -i wi0 -p 3 Ick, ad-hoc. No ifconfig interface for port type that I can see. > wicontrol -i w10 -k 0x0123456789 > > but it fails to set the key: > > $ sudo wicontrol -i wi0 | grep keys > Encryption keys: [ ][ ][ ][ ] /etc/rc.network; if [ -r /etc/start_if.${ifn} ]; then . /etc/start_if.${ifn} eval showstat_$ifn=1 fi /etc/pccard_ether; if [ -r /etc/start_if.${interface} ]; then . /etc/start_if.${interface} fi Hmm. Looks like it should work, and it's being sourced. Personally, I'd do (assuming fairly recent -STABLE); ---------------- ## # /usr/sbin/wicontrol -i ${interface} -p 3 /sbin/ifconfig ${interface} wepkey 0x0123456789 ---------------- The fact that /etc/start_if.${interface} is sourced might make David Wolfskill's scripts that use those files somewhat cleaner, since you can actually use ${interface} in /etc/start_if.${interface}. http://www.catwhisker.org/~david/FreeBSD/ P. -- pir pir@pir.net pir@net.tufts.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message