LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 02-21-2006, 06:02 PM   #1
omega9380
LQ Newbie
 
Registered: Feb 2006
Posts: 1

Rep: Reputation: 0
Unhappy Switching Ethernet devices on boot


Ok, here's the rundown. I'm running Fedora Core 4 on a Dell Inspiron 4000. It has a Dell TrueMobile 1150 MiniPCI wireless card, and I use a Netgear 511 PCMCIA card. The wired card is on eth0 and the wireless on eth1. I am a Linux newbie.

Here's what I want to do. At school, I need to be on the wired card configured with DHCP. At home I need both wireless and wired configured staticly. What I want is for my computer to ask me which of the three configs I want DURING BOOT. The three would of course be:

Wireless Static
Wired Static
Wired DHCP

Is this possible?

Last edited by omega9380; 02-21-2006 at 06:07 PM.
 
Old 02-21-2006, 07:36 PM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
You could save each of the configurations /etc/sysconfig/network/ifcfg-eth0 and /etc/sysconfig/network/ifcfg-wlan0
to templates and write some scripts in ~/bin that will copy over the current ones and start or stop ( or restart ) whatever service you need to. For example, save the configuration for your wireless device using dhcp. Suppose you named it ifcfg-school. Do the same for the home based wlan0 and eth0 config files. Then write a simple script that copies over the current value from the template, and then stops, starts or restarts whatever service that you need to.

Give these scripts mneumonic names, such as "school" and "home" or "net-school" and "net-home" and copy them to your path, such as in ~/bin. Entering "sudo school" will set up your configuration and you'll be ready to go in a few seconds.

I think this would be easier than using profiles. Make sure that the templates are readable only by root so that noone else can read the WIRELESS_WPA_PSK value from your wireless configuration.

If you wanted to, you could change the sudo configuration to allow yourself to execute these two scripts in particular as root without having to enter a password. That would speed up the process by a few seconds.

Last edited by jschiwal; 02-21-2006 at 07:43 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Switching back and forth between Wireless and Ethernet FWSquatch Linux - Wireless Networking 2 02-08-2006 09:40 PM
debian: two ethernet devices, only one works at a time petermbm Linux - Wireless Networking 3 09-29-2005 12:10 PM
switching between/activate network devices snow_bound Mandriva 3 06-04-2005 12:48 AM
Switching between two sound output devices in FC2 fat-guy Linux - Hardware 3 11-24-2004 08:18 PM
multiple ethernet devices poison Slackware 2 02-23-2004 06:46 AM


All times are GMT -5. The time now is 12:40 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration