Date: Wed, 20 Aug 2008 10:44:22 -0500 From: "Andrew Gould" <andrewlylegould@gmail.com> To: "FreeBSD Questions Mailing List" <freebsd-questions@freebsd.org> Subject: Python script for configuring wifi hot spots on FreeBSD Message-ID: <d356c5630808200844n66270c3ep251e2e38eb777141@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
------=_Part_21082_23961226.1219247062834
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
I just finished a Python script that:
1. prompts the user to select a wifi device from a list compiled from the
results of ifconfig and dmesg;
2. prompts the user to select an Access Point (SSID) from a list derived
from 'ifconfig [device] scan'; and
3. configures the wifi device using the chosen wifi device, SSID and
dhclient.
The script works with my system setup (ural0 and wi0 on FreeBSD 7.0); but
I'd like someone to review the script because:
1. I made several assumptions about patterns in the output of ifconfig and
dmesg based upon 2 wifi adapters.
I'd like to make sure the assumptions don't break with other hardware.
2. I store data in Python dictionaries. When I display the dictionaries,
the numbered options are not in order and I can't
figure out how to sort them. This appears to be a cosmetic issue only;
but it still bothers me.
3. My knowledge of networking is at a basic level.
I have attached the script -- it is only 4KB.
I would appreciate any advice/help.
Thanks,
Andrew
------=_Part_21082_23961226.1219247062834--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d356c5630808200844n66270c3ep251e2e38eb777141>
