LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Choosing network at boot time (https://www.linuxquestions.org/questions/slackware-14/choosing-network-at-boot-time-756282/)

desertViking 09-18-2009 06:25 PM

Choosing network at boot time
 
Hi,

I've got a Slackware 13 desktop system that has an ethernet card and a wirelss card in it. I usually roll the PC over to the wall when I want to connect via the hardwire (maybe for a fresh install or downloading large amounts of data). Other times, I am connected via the wireless PCI card using WPA.

To avoid conflicts, I would like to tell the boot scripts whether it should choose the hardwire ethernet port or the wireless card.

Is there a standard way that this could be accomplished? I was thinking about run-levels on the kernel line, but not sure how that would work out.

Thx in advance for any advice you'd like to share.

onebuck 09-18-2009 07:11 PM

Hi,

You have several options that you can use. 'ifpugd' is a daemon that is used to detect the cable status in/out.

'wicd' is another choice that you may want to look into.

These links and others can be found at 'Slackware-Links' . More than just SlackwareŽ links!

bgeddy 09-18-2009 09:03 PM

Here's an idea - I've just tried this somewhat but not fully. It should work however. Firstly - alter your /etc/rc.d/rc.inet1.conf network settings file surrounding eth0 and wlan0 settings something like this :
Code:

if [[ $IFACE="wired" ]] ;then
      USE_DHCP[0]="yes"
fi
if [[ $IFACE="wless" ]];then
  IFNAME[4]="wlan0"
  USE_DHCP[4]="yes"
  WLAN_all wlan settings[4]
fi

Substitute "all wlan settings" with the lines from your real settings.Then just have seperate lilo stanzas - one with :
Code:

append = "IFACE=wired"
and another with :
Code:

append = "IFACE=wless"
You'll obviously need a lilo stanza for the wired settings and another for the wireless ones. The boot time parameters will be set according to the stanza picked and should be picked up by the /etc/rc.inet1.conf script setting the interface accordindgly. So in effect you'll have a lilo section for wired networking and another for the wireless networking settings.

desertViking 09-18-2009 10:18 PM

That seems reasonable. Let me try that and I'll post what I learn. Thx for the thoughts!


All times are GMT -5. The time now is 09:54 PM.