You are not logged in.

#1 2009-02-02 00:34:48

nss
Member
Registered: 2007-05-08
Posts: 24

netcfg-menu works after boot, not during

From my rc.conf, I have:

#eth0="dhcp"
#INTERFACES=()
NETWORKS=(menu)
DAEMONS=(syslog-ng hal iptables net-profiles crond)

and /etc/network.d/ethernet:

CONNECTION="ethernet"
DESCRIPTION="A basic ethernet profile, using dhcp"
INTERFACE=eth0
IP="dhcp"
DHCP_TIMEOUT=8
PRE_UP="ifconfig eth0 up"
POST_DOWN="ifconfig eth0 down"

I get the netcfg menu at boot and select ethernet, but the connection fails. I think the error is "No connection available". The cable is securely plugged in. Running netcfg-menu manually after logging in works though. Any ideas?
Thanks.

Last edited by nss (2009-02-02 00:36:23)

Offline

#2 2009-02-14 17:30:11

iosonofabio
Member
From: Australia
Registered: 2008-10-09
Posts: 105

Re: netcfg-menu works after boot, not during

The only clue I can give you is that I have a *very* similar issue. In my case, I don't start netcfg at boot. I don't use the network daemon either. I log into X, open a terminal and execute:

 sudo netcfg eth

(eth is my profile name for ethernet dhcp connection), and I get a FAIL from the script. If I repeat exactly the same command a second time, it works.

Try to see whether you have my issue if you don't start the net-profiles daemon at boot. If yes, we're in the same valley. smile Personally, I suspect it being an issue connected to the language of netcfg: BASH. I'm not clever enough to prove this statement though. hmm

Another suggestion: wireless users had a similar problem with the command "iwconfig <interface> up", and it was solved by the developer by adding an option to netcfg. We could ask for the same, as soon as she/he has some time.

Offline

#3 2009-02-17 14:09:49

iosonofabio
Member
From: Australia
Registered: 2008-10-09
Posts: 105

Re: netcfg-menu works after boot, not during

Solved by putting following in the configuration:

PRE_UP='ifconfig eth0 up && sleep 3'

Apparently, the network card needs some seconds to get ready. With sleep 1 it still does not work. Note that the single quotation marks should not be necessary to the BASH syntax.

Offline

#4 2009-04-14 13:45:50

vinvin
Member
Registered: 2009-03-12
Posts: 24

Re: netcfg-menu works after boot, not during

Wouldn't there be a way for netcfg to check if the interface is up before trying to establish the connection? That sounds quite obvious.
(Yes, i have the same problem)

Offline

#5 2009-05-21 16:50:32

NotMarkus
Member
Registered: 2008-12-24
Posts: 11

Re: netcfg-menu works after boot, not during

I have the same problem, but with wireless and wlan0.

I added

PRE_UP='ifconfig wlan0 up && sleep 3'

but nothing changed.

I changed it to sleep 10, still nothing.

Then, as a test I changed it to

PRE_UP='ifconfig wlan0 up && sleep 5 && iwconfig wlan0 essid linksys && sleep 5 && dhcpcd wlan0 && sleep 5'

When I did this, it connected to the network perfectly. But in that case it's completely bypassing netcfg.

Offline

#6 2009-05-28 09:48:46

vinvin
Member
Registered: 2009-03-12
Posts: 24

Re: netcfg-menu works after boot, not during

Yes the PRE_UP can be added, but it will sleep even if the interface is up. That's quite annoying, when dhcp already take seconds.

Offline

#7 2009-05-28 11:12:25

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: netcfg-menu works after boot, not during

Try netcfg in [testing] and see if you still have this problem.

Offline

Board footer

Powered by FluxBB