FS#10365 - ifplugd 0.28-3

Attached to Project: Arch Linux
Opened by Tom (huuggee) - Tuesday, 06 May 2008, 20:53 GMT
Last edited by Thayer Williams (thayer) - Saturday, 06 December 2008, 23:18 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Kevin Piche (kpiche)
Thayer Williams (thayer)
Architecture i686
Severity Medium
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
appears to be a bug in '/etc/ifplugd/ifplugd.action'
when hotplugging ethernet cables, ifplugd.action references a (potentially outdated) wrong PID file for the dhcpcd of the interface. It currently looks to delete a PID file in '/etc/dhcpcd/' whilst on my freshly installed system the PIDs are stored in '/var/run/'

Additional info:
* ifplugd 0.28-3
* dhcpcd 3.2.1-1 (base)


Steps to reproduce:
ifplugd doesn't actually work as it fails to release a (dead) dhcpcd.pid file and therefore cannot request a new ip.
Always reproduceable

My Fix:
Apologies that I can't make this into a patch - not quite sure how yet. This fixes my system.

Change '/etc/ifplugd/ifplugd.action'
line 24 < rm -f /etc/dhcpc/dhcpcd-${1}.{pid,cache} >/dev/null 2>&1
> rm -f /var/run/dhcpcd-${1}.{pid,cache} >/dev/null 2>&1

line 38 < /bin/kill `cat /etc/dhcpc/dhcpcd-${1}.pid`
> /bin/kill `cat /var/run/dhcpcd-${1}.pid`


This task depends upon

Closed by  Thayer Williams (thayer)
Saturday, 06 December 2008, 23:18 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Removed duplicate network code from ifplugd.action script
Comment by Glenn Matthys (RedShift) - Tuesday, 17 June 2008, 13:36 GMT
The proper way to kill dhcpcd is to use dhcpcd -k <interface> (see man dhcpcd). Can the interface be derived from somewhere inside the ifplugd.action script?
Comment by Glenn Matthys (RedShift) - Tuesday, 17 June 2008, 13:38 GMT
Oh ${1} is the interface name. So those lines should be changed to:

dhcpcd -k ${1}

Instead of those rm and kill lines.

Loading...