View previous topic :: View next topic |
Author |
Message |
nadi Apprentice
Joined: 06 Aug 2004 Posts: 280 Location: Norway
|
Posted: Sat Aug 27, 2005 8:16 pm Post subject: ifplugd, ath0 and eth0 problem[SOLVED] |
|
|
hei all
I followed the thread https://forums.gentoo.org/viewtopic-t-298712.html in order to get a 'normal' operating network system, where the cable network, eth0, is always working IF the cable is plugged, and when I disconnect the cable, the wireless takes over and tries to connect (no scanning for now, only to a known essid with a known WEP key).
they both work well seperatly, but I cannot manage to do it automatically, though I followed everything in the thread https://forums.gentoo.org/viewtopic-t-298712.html
Does anyone have a operative ifplugd ?
Thanks,
Nadi
Last edited by nadi on Thu Sep 01, 2005 3:09 pm; edited 1 time in total |
|
Back to top |
|
|
PRC Apprentice
Joined: 15 Aug 2005 Posts: 191
|
Posted: Sun Aug 28, 2005 3:20 am Post subject: |
|
|
The script on that post requires you to have module removing compiled into the kernel. Here is my ifplugd.action contents:
Code: | case "$2" in
up)
state=start
otherstate=stop
;;
down)
state=stop
otherstate=start
;;
*)
echo "$0: wrong arguments"
echo "Call with <interface> <up|down>"
exit 1
;;
esac
if [ -x /etc/init.d/net.$1 ]
then
/etc/init.d/net.$1 --quiet $state
if [ $1 = eth0 ]; then
/etc/init.d/net.eth1 --quiet $otherstate
else
/etc/init.d/net.eth0 --quiet $otherstate
fi
fi
exit 0
else
logger -t ifplugd.action "Error: Couldn't configure $1, no /etc/init.d/net.$1 script!"
exit 1
fi
|
You might have to edit it a bit to get your th0 and eth0, but I believe that was the only thing that I tweaked of the directions. |
|
Back to top |
|
|
nadi Apprentice
Joined: 06 Aug 2004 Posts: 280 Location: Norway
|
Posted: Mon Aug 29, 2005 4:49 pm Post subject: |
|
|
I did exactly what the instructions said, and changed wherever I saw eth0 to ath0 (since I am using athrons) and changed the modules to ath_pci instead of ipw2200.
Still does not working: I have ath0 always on!
Nadi |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
nadi Apprentice
Joined: 06 Aug 2004 Posts: 280 Location: Norway
|
Posted: Wed Aug 31, 2005 12:23 am Post subject: |
|
|
Fancy that one! I like it, and when I first saw it, I thought it was strange that my wireless signal in on all the time, eventhough the cable was pluged, Now I understand.
To reverse the process of the script given above, originally taken from https://forums.gentoo.org/viewtopic-t-298712.html , I need to
1. re-link /etc/init.d/net.eth0 and net.ath0 to net.lo,
2. and put them both (net.etho and net.ath0) in default level.
3. then I have to re-emerge ifplugd to put the correct scripts.
4. I have to remove the script I put in /etc/init.d/ifstartup.
5. uncomment back the lines which start/stop interface in /etc/hotplug/net.agent
WHAT a mess. I hope I wont loose the wireless. But I will go back to the original gentoo ifplugd.
Thanks again, Uberlord. |
|
Back to top |
|
|
nadi Apprentice
Joined: 06 Aug 2004 Posts: 280 Location: Norway
|
Posted: Thu Sep 01, 2005 7:57 am Post subject: |
|
|
so now that I have done everything I said above, boot does not takes ath0 up nor eth0. I have to manually take them up. I reemerged dhcpcd and ifplugd, as well as hotplug.
hm.. ? any Idea where the problem lies? |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
nadi Apprentice
Joined: 06 Aug 2004 Posts: 280 Location: Norway
|
Posted: Thu Sep 01, 2005 11:21 am Post subject: |
|
|
you mean to uncomment
Code: | # MONITOR_wlan0="yes"
| from /etc/conf.d/ifplugd ?
what about the variable INTERFACE? Code: | #INTERFACES="eth0"
INTERFACES="auto"
|
should it be on "eth0" instead of "auto"?
Thanks |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
nadi Apprentice
Joined: 06 Aug 2004 Posts: 280 Location: Norway
|
Posted: Thu Sep 01, 2005 12:16 pm Post subject: |
|
|
from the wiki wireless: http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_Startup
Quote: | Once installed, you can edit the /etc/wpa_supplicant.conf file by checking out the examples in /etc/wpa_supplicant.conf.example. This file contains many options, and is well documented, and is a little easier to setup for multiple APs than by using /etc/conf.d/wireless. |
I strongly disagree that this file wpa_supplicant.conf.example is easy to understand. On the contrary: I, which know something about the OS and gentoo, but is weak in network, did not even manage to set a simple network it ssid="my_ssid" and a know simple ascii WEP key. The document is overwhelming for a beginner. One way to improve it (in my opinion) is to seperate it, for example with a horisontal line, for simple settings and advance settings, there, the simple settings include 2-3 examples for setting the ath0 (or wlan0) with ssid, WEP key (both ascii and hex) etc.
My opinion!
Nadi |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
nadi Apprentice
Joined: 06 Aug 2004 Posts: 280 Location: Norway
|
Posted: Thu Sep 01, 2005 1:47 pm Post subject: |
|
|
It's true, its true. I should have looked better. The gentoo hadbook is really helpfull.
Thanks, it is working now with wpa_supplicant.
you are great, Uberlord... |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
|