View previous topic :: View next topic |
Author |
Message |
r_schneid n00b
Joined: 27 Feb 2007 Posts: 5
|
Posted: Tue Feb 27, 2007 8:57 am Post subject: Switching LAN/WLAN on boot |
|
|
I use my laptop at home as well as at work, with an ethernet connection at work and WLAN (WIFI) at home. It annoyed me to wait for the inactive network to find out it was actually inactive (dhcp timeout). So I wrote a little script that checks if a ethernet cable is connected. If that is the case, the ethernet device eth0 is started. If not the WLAN, eth1, is started.
More detailed description:
http://gentoo-wiki.com/HARDWARE_Sony_Vaio_VGN-TX3#LAN.2FWLAN
(of course you may have to change device names)
Hope someone finds this useful.
Comments and suggestions are welcome.
Rene |
|
Back to top |
|
|
deno Guru
Joined: 13 Sep 2006 Posts: 411
|
Posted: Tue Feb 27, 2007 10:11 am Post subject: |
|
|
Nice, thnx, just what I need. |
|
Back to top |
|
|
ZmiyGorinich Guru
Joined: 27 Feb 2004 Posts: 369 Location: Zaporizhzhe, Ukraine
|
Posted: Wed Feb 28, 2007 2:27 pm Post subject: |
|
|
Thanks.
But how I can make this.
If network cable plug then use ethernet card for network, if unplug than use WiFi? _________________ Home: Athlon XP 2000+, ATI Radeon 9200 64Mb, 512Mb, hda:40Gb, hdb:120Gb, DVD-RW
Work : Duron 1.4, S3 ProSavage8 32Mb, 512Mb, hda:40Gb, CD-RW
Design, programming, hosting |
|
Back to top |
|
|
ppurka Advocate
Joined: 26 Dec 2004 Posts: 3256
|
Posted: Thu Mar 01, 2007 5:11 am Post subject: |
|
|
Very nice! I have been using a script on my own, which first tries the LAN and if it fails then modprobes and starts the wireless.
This script is _very_ useful in that context.
ZmiyGorinich wrote: | But how I can make this.
If network cable plug then use ethernet card for network, if unplug than use WiFi? | This is to be started as a service. So, when you boot your machine (or resume from suspend) then (re)start this service so that if a cable is plugged then it will start the LAN, and if there is no cable plugged in, it will start the wifi. _________________ emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/ |
|
Back to top |
|
|
Evincar Apprentice
Joined: 13 Feb 2007 Posts: 217 Location: Madrid
|
Posted: Thu Mar 01, 2007 5:42 pm Post subject: |
|
|
ZmiyGorinich wrote: | Thanks.
But how I can make this.
If network cable plug then use ethernet card for network, if unplug than use WiFi? |
Have you tried arping using arping configuration? Have a look at this:
http://gentoo-wiki.com/HOWTO_Network_profiles_with_arping
It works flawlessly for me: Auto-search the two wired gateways I use (home and work), if no plug, the wireless comes up and connects |
|
Back to top |
|
|
joysofpi n00b
Joined: 04 Mar 2007 Posts: 3
|
Posted: Sun Mar 04, 2007 6:24 pm Post subject: |
|
|
I believe sys-apps/netplug in portage also does this pretty well |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|