|
NetBSD General Other questions regarding NetBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|
|||
Start only connected Nic at boot
When I boot NetBSD both services for ethernet and wireless are started even though only one of them, mostly the wireless one are connected.
I'd like to know if there is a way that only the connected nic begins its service. For example, if the system realizes that there is no ethernet cable connected to just start the wireless one. I've only added my wireless to rc.conf and that is a little confusing to me why the system tries to bring up the ethernet connection as well. |
|
|||
Quote:
Interfaces are configured through either ifconfig(8) or ifconfig.if(5). If you are wanting to selectively start (configure) your wireless interface based upon whether your wired interface is active (I'm guessing from upon boot...), you will need to write a script which parses the output of ifconfig(8) to determine whether the wired interface is up or down, & depending upon this, pass the appropriate information to ifconfig(8) to configure the wireless interface. I believe all the information you need is in the manpages cited. Now all you need is to write the script itself. |
|
|||
Thanks. I read something similar to the points you mentioned on hubertf's NetBSD blog but the post was quite old and I thought there could be other solutions meanwhile.
|
|
|||
Quote:
Most people don't want this. By placing the command into an executable script in your home directory, ~/bin/, or where ever the script can be found on the path, you can manually configure the interface whenever you want. I also suspect there is an ifconfig.if(5) file specific to your Ethernet interface in /etc/. The purpose of this file is to configure an interface consistently upon every boot. From your comments, this may be source of your confusion. Your Ethernet interface is so configured, but your wireless interface wasn't until you forced a similar configuration into rc.conf. |
|
|||
As ocicat alluded to, there are at least 2 ways to starts a network connection
1) From rc.conf 2) From an ifconfig.if file in /etc If you are looking to automate your connection, once you get them sorted out, there are several options. If your are using wpa_supplicant for your wireless you can set priorities and bring up wired, open-wireless, wep-wireless and wpa(2)-wireless. For example if the wired interface has the highest priority and the cable is plugged in and active it will associate with the wired nic and stop. Search for priority and wpa_supplicant and read the wpa_supplicant man page for more info. Another option is to # the unneeded connection in rc.conf. I think a wireless network manager has also has been ported to NetBSD that will handle wired connections. Last edited by shep; 19th January 2012 at 01:52 AM. Reason: spelling and punctuation |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
proftpd start at boot wont work | jjjustjjjay | OpenBSD General | 9 | 28th February 2010 12:40 AM |
SATA connected CD/DVD drives, any experience? | teig | FreeBSD General | 13 | 6th December 2008 01:35 AM |
Can start rtorrent like apache and mysql when system boot | mfaridi | FreeBSD Ports and Packages | 0 | 26th November 2008 09:27 AM |
Transmission web inteface start when system boot | mfaridi | FreeBSD Ports and Packages | 2 | 27th September 2008 06:53 AM |
How can I start xscreensaver daemon at boot | rex | FreeBSD General | 7 | 15th May 2008 02:34 PM |