You are not logged in.

#1 2013-04-06 13:15:27

gammel.holte
Member
Registered: 2010-02-01
Posts: 53

ifplugd fails, dhcpcd works fine

Hello,

I'm trying to set up ifplugd on systemd. I'm not using netcfg. My network adapter is eth0, so simply doing

systemctl enable ifplugd@eth0

and rebooting or doing

systemctl start ifplugd@eth0

should work.

However, it fails. Log from journalctl:

Apr 06 14:53:40 macbook2 systemd[1]: Starting Daemon which acts upon network cable insertion/removal...
Apr 06 14:53:40 macbook2 ifplugd(eth0)[531]: ifplugd 0.28 initializing.
Apr 06 14:53:40 macbook2 ifplugd(eth0)[531]: Using interface eth0/00:23:32:B1:AB:B8 with driver <forcedeth> (version: 0.64)
Apr 06 14:53:40 macbook2 ifplugd(eth0)[531]: Using detection mode: SIOCETHTOOL
Apr 06 14:53:40 macbook2 ifplugd(eth0)[531]: Initialization complete, link beat detected.
Apr 06 14:53:40 macbook2 ifplugd(eth0)[531]: Executing '/etc/ifplugd/ifplugd.action eth0 up'.
Apr 06 14:53:40 macbook2 ifplugd(eth0)[531]: Program execution failed, return value is 1.
Apr 06 14:53:40 macbook2 systemd[1]: Started Daemon which acts upon network cable insertion/removal.

Oddly from the above journalctl log and from the output of systemctl, systemd seems to think that ifplugd is running fine:

ifplugd@eth0.service                                loaded active running   Daemon which acts upon network cable insertion/

If I remove ifplugd and run dhcpcd@eth0 instead, everything goes fine as long as I have a plugged cable when I boot my machine---which is the expected behaviour.

Any ideas?

Thanks

Offline

#2 2013-04-06 23:55:55

gammel.holte
Member
Registered: 2010-02-01
Posts: 53

Re: ifplugd fails, dhcpcd works fine

The problem is actually that ifplugd.action does not exist, as suggested by my log!

Such a bug was reported some time ago: https://bugs.archlinux.org/task/31341. However, it was closed, arguing that you should write your own ifplugd.action script.

The wiki says implicitly that such a script is provided: https://wiki.archlinux.org/index.php/Ne … or_laptops

Can anyone shed some light on this? It seems reasonable to think that ifplugd.action should be bundled with ifplugd, right?

Another cause of concern is that systemctl never reported that ifplugd had failed, as seen in my log.

Offline

#3 2013-04-07 20:47:03

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,845

Re: ifplugd fails, dhcpcd works fine

gammel.holte wrote:

The problem is actually that ifplugd.action does not exist, as suggested by my log!

Such a bug was reported some time ago: https://bugs.archlinux.org/task/31341. However, it was closed, arguing that you should write your own ifplugd.action script.

The wiki says implicitly that such a script is provided: https://wiki.archlinux.org/index.php/Ne … or_laptops

Can anyone shed some light on this? It seems reasonable to think that ifplugd.action should be bundled with ifplugd, right?

What should a default ifplugd do?
Maybe the wiki should be changed?

gammel.holte wrote:

Another cause of concern is that systemctl never reported that ifplugd had failed, as seen in my log.

See SuccessExitStatus in the service file.


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#4 2013-04-07 21:01:34

gammel.holte
Member
Registered: 2010-02-01
Posts: 53

Re: ifplugd fails, dhcpcd works fine

skanky wrote:

What should a default ifplugd do?
Maybe the wiki should be changed?

By default, I'd expect it to instantiate a dhcpcd whenever I plug a cable.

This is what the wiki more or less suggests:

ifplugd is a daemon which will automatically configure your Ethernet device when a cable is plugged in and automatically unconfigure it if the cable is pulled.

By default it is configured to work for the eth0 device. This and other settings like delays can be configured in /etc/ifplugd/ifplugd.conf

I think it's a bit unexpected to download ifplugd and need to roll your own script for the most common scenario.

Either the wiki should be changed, or ifplugd should provide this script---which is what it used to do and what it does in other distros.

Offline

#5 2013-04-07 21:31:39

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,845

Re: ifplugd fails, dhcpcd works fine

Here's the one that's bundled with ifplugd source code: http://git.0pointer.de/?p=ifplugd.git;a … on;hb=HEAD


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

Board footer

Powered by FluxBB