FS#6959 - Error on network restart

Attached to Project: Arch Linux
Opened by Jules (Misfit138) - Friday, 20 April 2007, 01:12 GMT
Last edited by Thomas Bächler (brain0) - Sunday, 21 October 2007, 09:06 GMT
Task Type Bug Report
Category System
Status Closed
Assigned To James Rayner (iphitus)
Thomas Bächler (brain0)
Architecture All
Severity Medium
Priority Normal
Reported Version 0.8 Voodoo
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Arch 0.8 2.6.19 Beyond,
current, community, extra repos
Bug:When doing /etc/rc.d/network restart the following error is obtained:

Error, wlan0: dhcpcd already running (/var/run/dhcpcd-wlan0.pid)


Fix as follows:
Line 44 in /etc/rc.d/network
rm -f /etc/dhcpc/dhcpcd-${1}.{pid,cache} >/dev/null 2>&1

must be changed to:

rm -f /var/run/dhcpcd-${1}.{pid,cache} >/dev/null 2>&1
This task depends upon

Closed by  Thomas Bächler (brain0)
Sunday, 21 October 2007, 09:06 GMT
Reason for closing:  Fixed
Additional comments about closing:  second fix applied to initscripts-git
Comment by lanjelot (lanjelot) - Monday, 23 April 2007, 17:18 GMT
Changing every occurence of /etc/dhcpc/ to /var/run/ does get rid of this error message but then there is another issue. Since dhcpcd does not bring the interface down, interface will not have an IP address after restart, although it will be UP.

I propose the attached patch to fix both issues.


Comment by lanjelot (lanjelot) - Monday, 23 April 2007, 17:57 GMT
Maybe i was not very clear. What i meant was "interface will not have an IP address after restart," because it is already UP.

The network script does not actually bring up an interface that is already up, thus after killing dhcpcd, interface is not brought down. Then from the start() function, dhcpcd will not be executed since this interface is already up. So in the end, we get an interface UP without any IP address.
Comment by PK (pelle.k) - Wednesday, 25 April 2007, 22:01 GMT
I confirm this. I can't belive more people aren't noticing this!
Comment by Jules (Misfit138) - Wednesday, 25 April 2007, 22:10 GMT
I'm surprised too. I posted the bug and used the workaround above, which avoids the error message, but apparently does not fix it.
Comment by Igor (cheer) - Sunday, 29 April 2007, 05:17 GMT
Yes, I've also noticed it. And the issue mentioned by lanjelot.
Comment by Jeremy (loserMcloser) - Sunday, 29 April 2007, 14:33 GMT
This issue also seems to affect network profiles:

###############################################################
> netcfg my-dhcp-profile
:: Starting network profile: my-dhcp-profile [DONE]
> netcfg --stopall
:: Shutting down interface: eth0 [DONE]
> netcfg my-dhcp-profile
:: Starting network profile: my-dhcp-profile [BUSY]
Error, eth0: dhcpcd already running (/var/run/dhcpcd-eth0.pid)
[FAIL]
###############################################################

A 'killall dhcpcd' is then required before the network profile can be brought back up.
Comment by Li Sun (depp) - Wednesday, 09 May 2007, 06:24 GMT
the fixed should be on 'netcfg', cause '/etc/rc.d/network' calls 'netcfg' to stop interfaces
Comment by Roman Kyrylych (Romashka) - Wednesday, 11 July 2007, 15:27 GMT
reopened on this request:
The second part of the lanjelot`s patch is not applied. It` s necessary use /etc/rc.d/network two times to restart network. First time the network script kills dhcpd and second time it brings down the interface.

Loading...