# baselayout 1.12.0 and ifplugd trip each other up?

## davison

I upgraded baselayout a while back on my laptop to get better support for the wireless card.  This now works great and comes up at boot time, connecting to a suitable AP.

However, my wired eth0 (which was working perfectly with ifplugd) now doesn't get configured correctly.  The interface is brought up but I *think* ifplugd immediately tries to take it down again.  I'm left with no IP address on eth0 until I issue 

```
# dhcpcd eth0
```

 at which point it instantly gets an IP address and continues to work well.

Tried stuff like 

```
laptop ~ # /etc/init.d/net.eth0 restart

 * Stopping eth0

 *   Bringing down eth0

 *     Stopping dhcpcd on eth0 ...                                                            [ ok ] 

 *     Shutting down eth0 ...                                                                 [ ok ]

 *     Stopping ifplugd on eth0 ...                                                           [ ok ]

 * Starting eth0

 *   Starting ifplugd on eth0 ...                                                             [ ok ]

 *     Failed to configure eth0 in the background                                             [ !! ]
```

 (and again, a manual dhcpcd request is required).

Not sure which bits of config are relevant so here's a selection:

```
laptop ~ # cat /etc/conf.d/net

config_eth0=( "dhcp" )

dhcp_eth0="-t 15"

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dndiswrapper"

wpa_timeout_wlan0=45

config_wlan0=( "dhcp" )

laptop ~ # grep ^[^#] /etc/conf.d/ifplugd

INTERFACES="eth0"

AUTO="no"

BEEP="yes"

IGNORE_FAIL="yes"

IGNORE_FAIL_POSITIVE="no"

IGNORE_RETVAL="yes"

POLL_TIME="1"

DELAY_UP="0"

DELAY_DOWN="0"

API_MODE="auto"

SHUTDOWN="no"

WAIT_ON_FORK="no"

MONITOR="no"

ARGS=""

DELAY_UP_wlan0="5"

DELAY_DOWN_wlan0="10"
```

Anyone able to give me some pointers?

Kind Regards,

----------

## maKKus

I've the same problem, no solution.

Was working great before.

Just to let you know you are not the only one.Last edited by maKKus on Tue Nov 01, 2005 9:34 am; edited 1 time in total

----------

## davison

hmm..  just saw this in another thread that UberLord posted a few mins ago:

 *Quote:*   

> It looks like you're using baselayout-1.12 - the latest in portage (1.12.0_pre9-r1) has inbuilt ifplugd support, which means you don't need the ifplugd init script. 

 

I stopped ifplugd (and removed from runlevels) but same issue persists..

----------

## loki99

I don't think it has anything to do with ifplugd, as I am having the same problem with my dektop box.

Everything seems to be set ok, but I still need to do dhcpcd manually to get my ip and a working DNS.   :Confused: 

----------

## UberLord

I can tell you that baselayout-1.12 does not use /etc/conf.d/ifplugd - all settings should go into /etc/conf.d/net as ifplugd_eth0=" ifplugd commandline options"

The chances are that the plug timeout is too short (we default to 10 seconds) - a negative value may be better for you, experiment and post your results re the default timeout

```
plug_timeout_eth0="10"
```

You can always not use the ifplugd module

```
modules=( "!ifplugd" )
```

and go back to the init script instead if you wish

----------

## loki99

 *UberLord wrote:*   

> I can tell you that baselayout-1.12 does not use /etc/conf.d/ifplugd - all settings should go into /etc/conf.d/net as ifplugd_eth0=" ifplugd commandline options"
> 
> The chances are that the plug timeout is too short (we default to 10 seconds) - a negative value may be better for you, experiment and post your results re the default timeout
> 
> ```
> ...

 

But why am I having the same prob with my desktop box? I obviously never used ifplugd.

----------

## UberLord

 *loki99 wrote:*   

> But why am I having the same prob with my desktop box? I obviously never used ifplugd.

 

If you're using wpa_supplicant-0.4.6 then it's a known bug

https://bugs.gentoo.org/show_bug.cgi?id=111053

----------

## loki99

 *UberLord wrote:*   

>  *loki99 wrote:*   But why am I having the same prob with my desktop box? I obviously never used ifplugd. 
> 
> If you're using wpa_supplicant-0.4.6 then it's a known bug
> 
> https://bugs.gentoo.org/show_bug.cgi?id=111053

 

I don't have it installed. I'm using a plain dsl-modem with cable connection to my rhine NIC.   :Confused: 

```
valhalla loki # emerge -pv wpa_supplicant

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild  N    ] net-wireless/wpa_supplicant-0.3.9-r1  -gsm +readline +ssl 2,225 kB 

Total size of downloads: 2,225 kB

```

EDIT: Is there anything I'm missing? I'm having the flu right now and most probably wasn't concentrated eneugh while updating, yesterday!   :Rolling Eyes: 

----------

## UberLord

OK, am I supposed to read your mind? All your text imply that you have this same bug, and there's 3 possible modules that cause this timeout error

ifplugd, netplugd and wpa_supplicant.

Why don't you try starting a new thread if it's not an ifplugd issue.

----------

## davison

 *UberLord wrote:*   

> The chances are that the plug timeout is too short (we default to 10 seconds) - a negative value may be better for you, experiment and post your results re the default timeout
> 
> ```
> plug_timeout_eth0="10"
> ```
> ...

 

changed it 60 - didn't make any difference.  Failed to configure eth0 until I run "dhcpcd eth0" manually.

Also, for info: 

```
laptop ~ # emerge netplug ifplugd wpa_supplicant -pv

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild  N    ] sys-apps/netplug-1.2.9-r1  21 kB

[ebuild   R   ] sys-apps/ifplugd-0.28  -doc 0 kB

[ebuild   R   ] net-wireless/wpa_supplicant-0.3.9-r1  -gsm +readline +ssl 0 kB

Total size of downloads: 21 kB
```

Regards,

----------

## loki99

 *UberLord wrote:*   

> OK, am I supposed to read your mind...

 

Better not! You wouldn't like it.   :Twisted Evil: 

Sorry for the confusing posts. I'll try again when my temperature is back to somewhat more normal.

----------

## nadi

I have the same problem with ifplugd, I am using wpa_supplicant and baselayout 1.12.0_pre9, and suddenly I cannot use the eth0:

```
nadi barc # /etc/init.d/net.eth0 restart

 * Caching service dependencies ...

 *  Cannot add provide 'authdaemond', as a service with the same name exists!                             [ ok ]

 * Stopping eth0

 *   Bringing down eth0

 *     Stopping dhcpcd on eth0 ...                                                                        [ ok ]

 *     Shutting down eth0 ...                                                                             [ ok ]

 *     Stopping ifplugd on eth0 ...                                                                       [ ok ]

 * Starting eth0

 *   Starting ifplugd on eth0 ...                                                                         [ ok ]

 *     Failed to configure eth0 in the background                                                         [ !! ]

nadi barc # 

```

eventhough I tried what Uberlord suggested in this thread, to increase the time to 60 sec. no help there. I was wandering, shall i just put the next line 

```
plug_timeout_eth0="10"
```

in /etc/conf.d/net ??

Thanks,

Nadi

----------

## nadi

and btw UberLord, VG er utrolig dårlig avis!!!

Nadi

----------

## UberLord

 *nadi wrote:*   

> and btw UberLord, VG er utrolig dï¿½rlig avis!!!

 

I have no opinion on that newspaper, having never read it  :Razz: 

----------

## nadi

I tried both longer timeout, and to deactivate the ifplugd script. 

```

modules=( "!ifplugd" )

```

when I did, and restarted /etc/init.d/net.eth0 , I got ip address 

```
nadi barc # /etc/init.d/net.eth0 restart

 * Stopping eth0

 *   Bringing down eth0

 *     Stopping dhcpcd on eth0 ...                                                                        [ ok ]

 *     Shutting down eth0 ...                                                                             [ ok ]

 * Starting eth0

 *   Configuration not set for eth0 - assuming dhcp

 *   Bringing up eth0

 *     dhcp

 *       Running dhcpcd ...                                                                               [ ok ]

 *       eth0 received address 129.241.10.110/24

```

But the network was still not functioning: I had ip address, but could not use the network. I commented this line, and opps! there came the network again in the wireless (still not eth0).

Why ???

----------

## UberLord

Enable ifplugd again, add plug_timeout_eth0="-1" and restart net.eth0

After a minute or so do ifconfig eth0

If it reports an IP address then ifplugd is working and the problem is somewhere else

----------

## nadi

I get

```
nadi barc # ifconfig eth0

eth0      Link encap:Ethernet  HWaddr 00:09:6B:3F:40:36  

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:13963 errors:0 dropped:0 overruns:0 frame:0

          TX packets:345 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:1076587 (1.0 Mb)  TX bytes:231323 (225.9 Kb)

          Base address:0x8000 Memory:c0220000-c0240000 

```

----------

## UberLord

And the output of ifplugdstatus and grep "Nov  1 .*ifplugd" /var/log/messages please

----------

## nadi

you mean /var/log/everything/current? then the output is 

```
Nov  1 17:50:19 [ifplugd(eth0)] Link beat lost.

Nov  1 17:50:19 [ifplugd(eth0)] Executing '/usr/sbin/ifplugd.action eth0 down'.

Nov  1 17:50:19 [ifplugd(eth0)] Killing child.

Nov  1 17:50:19 [ifplugd(eth0)] client:  ERROR:  "net.eth0" is already stopping.

Nov  1 17:50:19 [ifplugd(eth0)] Program execution failed, return value is 0.

Nov  1 17:50:19 [ifplugd(eth0)] Exiting.

Nov  1 17:50:21 [ifplugd(eth0)] ifplugd 0.28 initializing.

Nov  1 17:50:21 [ifplugd(eth0)] Using interface eth0/00:09:6B:3F:40:36 with driver <e1000> (version: 6.0.54-k2-NAPI)

Nov  1 17:50:21 [ifplugd(eth0)] Using detection mode: SIOCETHTOOL

Nov  1 17:50:21 [ifplugd(eth0)] Initialization complete, link beat detected.

Nov  1 17:50:21 [ifplugd(eth0)] Executing '/usr/sbin/ifplugd.action eth0 up'.

Nov  1 17:50:22 [ifplugd(eth0)] client:  WARNING: "net.eth0" has already been started.

Nov  1 17:50:22 [ifplugd(eth0)] Program executed successfully.

```

(I dont have /var/log/messages)

I cannot locate the file ifplugdstatus either. I dont have it!

EDIT: oops:

```

 nadi barc # ifplugstatus 

lo: link beat detected

eth0: link beat detected

ath0: link beat detected

```

Does it mean that it is working?

----------

## davison

given that at least three people have the same problem now, should this be opened as a bug in bugzilla?

Cheers,

----------

## UberLord

No, I think the issue will be fixed in baselayout-1.12.0_pre10 - but open one if it makes you feel happy or pre10 doesn't fix it  :Smile: 

----------

## davison

cool, thanks.  I'll wait for pre10 and file a bug then if I can't resolve it.

Cheers!

----------

## maKKus

Installed baselayout-1.12.0_pre10 and there is still the same problem, ifplugd fails to get a ip-address and dhcpcd eth0 works. Going back to baselayout-1.11.13-r2 solves it.

----------

## UberLord

I hope you guys are using ifplugd-0.28-r4 and not the stable release?

----------

## maKKus

*  sys-apps/ifplugd

      Latest version available: 0.28-r4

      Latest version installed: 0.28-r4

      Size of downloaded files: 139 kB

      Homepage:    http://0pointer.de/lennart/projects/ifplugd/

      Description: Brings up/down ethernet ports automatically with cable detection

      License:     GPL-2

Everything on this machine is ~amd64

----------

## UberLord

makkus, could you post a log snippet for me with it failing please?

Thanks

----------

## maKKus

I emerged baselayout-1.12.0_pre9-r10 and ifplugd again to show you the errors and now it is working. Sorry and thanks!

----------

## UberLord

That's a relief as I was really starting to run out of ideas!

----------

## davison

 *UberLord wrote:*   

> That's a relief as I was really starting to run out of ideas!

 

I just updated to baselayout 1.12.0_pre10 and ifplugd 0.28-r4 and still have the same problem.  Still need to manually issue "dhcpcd eth0" as root after a reboot.

 :Sad: 

Notice the previous poster said he used baselayout _pre9 and that it worked?

Regards,

----------

## UberLord

Did you ensure that the ifplugd init script got updated if you're still using it?

Could you post a syslog snippet of ifplugd messages for me?

----------

## davison

hmm.. I booted the laptop this morning at home and it connected via wlan0 OK (which is normal).  Just booted in the office via eth0 and that worked too.

I did a cold boot prior to the last message to make doubly certain, and it definitely failed.  I'll keep an eye on this over the next few days, but today is certainly the first time it's worked for both and wired and wireless.

Cheers,

----------

