autonet
autonet copied to clipboard
(DEPRECATED: use ifconfig(8) join instead) Simple wifi chooser for OpenBSD
$OpenBSD: README.template,v 1.5 2016/08/27 09:47:26 ajacoutot Exp $
+------------------------------------------------------------------------------- | Running ${FULLPKGNAME} on OpenBSD +-------------------------------------------------------------------------------
autonet is a simple wifi network chooser for OpenBSD.
Installation
Clone the repo as /usr/ports/mystuff/net/autonet. Then run:
make install
Using autonet
Run "autonet". autonet will scan for networks. If it sees one that
it recognizes, it will create the appropriate hostname.if(5) file
as a symlink into /etc/hostname.d (described below) and exec
/etc/netstart
autonet does not continuously monitor for network changes in the background. It doesn't show you a list of networks and ask you to pick one. It doesn't communicate over dbus. It has no runtime configuration whatsoever -- if you want to add a new network, you need to recompile it. You run it whenever you want to get onto a known wireless network, it finds a network for you and connects to it, and then it exits. If you're in a cafe and need to figure out which network to connect to, just scan and configure with ifconfig(8).
Configuration
Edit config.h and recompile.
autonet assumes that you have files under /etc/hostname.d that are
named like "
So for instance if you are using autonet on iwn0 and have a NetPref with
{ .nwid = "attwifi", .filename = NULL },
there should be a file at /etc/hostname.d/iwn0.attwifi that contains the hostname.if(5) configuration for the attwifi network. Likewise if you have
{ .nwid = "whatever", .filename = "mynet" },
/etc/hostname.d/iwn0.mynet should contain the configuration for the "whatever" network.
autonet looks for networks in the order they're defined in config.h.
Boot-time usage
autonet may be used to pick your computer's network on boot. A patch that modifies /etc/rc to do this is included as rc-autonet.patch.