View Single Post
  #1   (View Single Post)  
Old 17th June 2010
dylanz dylanz is offline
Port Guard
 
Join Date: May 2008
Posts: 13
Default Netstart / Required Reboots on Interface Changes

I've been taking my laptop around and accessing a wide array of access points. My method of switching interfaces has been something like so:

Code:
> cp /etc/hostname.rum0 /etc/hostname.rum0.home
> vi /etc/hostname.rum0 #adding in the new connection information
> sudo sh /etc/netstart rum0
I noticed however, that even using this method, I can find the access point I want to connect to, but it gives a "status: not connected" message in ifconfig. I tried a variety of options, like "ifconfig rum0 down", "ifconfig rum0 up", "sh /etc/netstart rum0"... etc. Still not connected.

However, when I restart my machine, it connects right away.

In reading netstart(8), it says that netstart is invoked after after single user mode is exited / during system boot. I looked at /etc/rc, and it simply does a ". /etc/netstart" (however, it does look like it does a /usr/sbin/dhcpd as well, and I haven't tested running that as well).

Any ideas before I start digging in deeper? I'd like to be able to run a simple user inputted ksh script when I travel around to:

1. Find access points
2. Connect to (x) access point
3. Prompt and enter credentials
4. Backup existing access points
5. Etc

I don't think something like that exists yet as far as I can tell.
Suggestions welcome!
Reply With Quote