Date: Thu, 23 Jun 2005 20:25:13 +0100 From: Hanno Krusken <lr101fc@yahoo.co.uk> To: freebsd-mobile@freebsd.org Subject: iwi.sh script modified for DHCP auto load in FreeBSD-5.4-RELENG-p2 Message-ID: <42BB0C99.9090005@yahoo.co.uk>
next in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi folks, I'm a lazy guy, and don't want to call iwicontrol all the time... So I installed the "iwi-firmware-2.3_1" from the ports collection /usr/ports/net/iwi-firmware" in FreeBSD-5.4-RELENG-p2, for a INTEL pro-2915abg miniPCI card. the trick is, to load the: miibus_load="YES" and the if_iwi_load="YES" command in "/boot/loader.conf" under NETWORK DEVICES ! this way the: "if_iwi.ko" is loaded right from the begining ! the "/etc/rc.conf" need the entries: iwi_enable="YES iwi_interfaces="iwi0" iwi_mod_iwi0="bss" after that my modified: /usr/local/etc/rc.d/iwi.sh dose the rest ;o) after every boot, the intel pro 2915abg get associated automaticly to any open wireless network ! This settings works on my home router and at work with a total differend "ssid" at full speed ! To make it even more conviniens, install the "xwlans" package for X11, and load it with: xtoolwait xwlans -i iwi0 -ct -black -n 2 -m 1 -nf in your ".xsession" file, you get a nice bar in the top left corner, that informes you constantly about the signal strengt. PS: it works with "BlackBox" window manager on my laptop, I don't know if this will work with desktop manager like KDE or GNOME ??!! THE SCRIPT: (in /usr/local/etc/rc.d/iwi.sh) there are only a few lines modified, to allow the firmware to load ! - ------------------------------------------ #!/bin/sh # # $FreeBSD: ports/net/iwi-firmware/files/iwi.sh.in,v 1.1 2005/06/22 19:43:26 flz Exp $ # # PROVIDE: iwi # REQUIRE: LOGIN abi # BEFORE: securelevel # KEYWORD: FreeBSD shutdown # Add the following line to /etc/rc.conf to enable `iwi': # # iwi_enable="YES" # . "/etc/rc.subr" name="iwi" rcvar=`set_rcvar` start_cmd="iwi_start_cmd" stop_cmd="iwi_stop_cmd" load_rc_config "$name" : ${iwi_enable="NO"} : ${iwi_interfaces="iwi0"} command="/usr/local/sbin/iwicontrol" iwi_start_cmd() { echo -n "Starting iwi" for i in ${iwi_interfaces}; do eval _mode=\$iwi_mode_${i} case ${_mode} in ""|bss|ibss|sniffer) ;; *) echo "${_mode} - Possible values for iwi_mode_${i} are bss|ibss|sniffer." exit 1 ;; esac eval _mode=\$_iwi_file_${i} echo -n " [${i}:${_mode:=bss}]" ${command} -i ${i} -d /usr/local/share/iwi-firmware -m ${_mode:=bss} done echo -n " [${i}:${switch}] " for i in ${iwi_interfaces}; do ${command} -i ${i} -r done echo -n " [${i}:${mode:=11g}] " ifconfig iwi0 mode 11g echo -n " [${i}:${DHCP:=client}] " dhclient -nw iwi0 echo "." } iwi_stop_cmd() { echo "Stopping iwi." for i in ${iwi_interfaces}; do ${command} -i ${i} -k done } run_rc_command "$1" - ------------------------------------------- have a go Hanno -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCuwyYBG3FBOpOS2oRAgYQAJ9hh64KSUOK03Klb+gFHwkoKxOBEQCgw/pE CwqdtIhZeWAzUQuYG2JY9+U= =BK1B -----END PGP SIGNATURE----- ___________________________________________________________ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42BB0C99.9090005>