LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-12-2012, 06:32 PM   #1
gobo7
Member
 
Registered: Aug 2012
Posts: 38

Rep: Reputation: Disabled
auto nic selection for appliance


i have built a 13.37 box that will be used as an "appliance" (no X.) both the system board nic and a usb wireless adapter have been configured with two different ip addresses (not sure this is necessary.) it will mostly be used with the wireless adapter. but if i have to move it to the bench, i would like the wired nic to function.

in its current config, the "default" nic is wlan0 as IFNAME[0]. eth0 is IFNAME[4]. if i need to use the wired, i have to down wlan0 and up eth0.

while this manual selection works, i'm wondering if there is a way to automate. without running a gui tool like networkmanager; not running X.


thanks.
 
Old 08-13-2012, 11:08 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Hello, welcome to LQ.

I think that wicd (in /extra) can do that. It can be used either with (commands "wicd-client" or "wicd-gtk") or without gui (commands "wicd-cli" or "wicd-curses"), as you like, so it doesn't need that X be running.

To use it you need to undo your manual configuration of the network, i.e. put back the relevant /etc/rc.d/inet1.conf and /etc/rc.d/rc.wireless.conf in their initials states.
 
Old 08-13-2012, 11:35 AM   #3
philanc
Member
 
Registered: Jan 2011
Posts: 308

Rep: Reputation: 273Reputation: 273Reputation: 273
Quote:
Originally Posted by gobo7 View Post
in its current config, the "default" nic is wlan0 as IFNAME[0]. eth0 is IFNAME[4]. if i need to use the wired, i have to down wlan0 and up eth0.
You could use ethtool in a boot script (eg. rc.local) to check if ethernet is plugged in.

Something like:
if ethtool eth0 | grep -q "Link detected: yes" ; then <down wlan0, up eth0> fi

HTH

Phil
 
Old 08-13-2012, 11:28 PM   #4
gobo7
Member
 
Registered: Aug 2012
Posts: 38

Original Poster
Rep: Reputation: Disabled
i had read about wicd, but somehow missed that it has a cli interface. curses works for me so i'll give it a look.

but ethtool sounds like what i need to use (never heard of this one before.) it will be booted with only one of the two nics, so the test at boot would work. keep me from having to remember to up the wired on the few times it's needed.


this helps. thank you for the responses.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Selection Buffer sending text before completing selection fakie_flip Linux - Software 2 06-20-2010 07:54 AM
Auto-Detecting the NIC in RedHat 9.0 redalert2 Linux - Newbie 2 01-09-2008 04:33 PM
nic auto startup doesnt work one.eleven Linux - Networking 3 01-02-2004 03:37 PM
Auto loading a NIC module in RH9 MadTurki Linux - Networking 1 12-23-2003 01:21 PM
Resolution Auto-Selection dolvmin Linux - Software 0 08-03-2003 05:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration