FS#26607 - [netcfg] 2.6.8-1 /etc/rc.d/net-auto-wired. should source /etc/conf.d/netcfg

Attached to Project: Arch Linux
Opened by Olivier Mehani (shtrom) - Monday, 24 October 2011, 23:25 GMT
Last edited by Jouke Witteveen (jouke) - Friday, 11 May 2012, 19:00 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jouke Witteveen (jouke)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:

The net-auto-wired uses variable WIRED_INTERFACE to decide which interface to start ifplugd on.

However, as configuration files, it only sources /etc/ifplugd/ifplugd.conf, which doesn't define this variable, but only operational parameters for ifplugd, which makes sense.

So, WIRED_INTERFACE is not defined, and ifplugd starts, as instructed, on interface '-r': /usr/sbin/ifplugd -i $WIRED_INTERFACE -r $ACTION $A (i.e. /usr/sbin/ifplugd -i -r ...)

The PID file, /var/run/ifplugd.$WIRED_INTERFACE.pid (i.e. /var/run/ifplugd..pid) is of course not found, as ifplugd created /var/run/ifplugd.-r.pid.

/etc/conf.d/netcfg already defines WIRELESS_INTERFACE, so it seems reasonable to add the definition of WIRED_INTERFACE there too (it is not there at the moment, but should be there by default ), and source that file at the beginning of /etc/rc.d/net-auto-wired.

Additional info:
* netcfg-2.6.8-1

Steps to reproduce:
* rc.d start net-auto wired
* startup fails
* a stray ifplugd is running on interface -r, and the associated PID file /var/run/ifplugd.-r.pid has been created
* no connection is attempted when the cable is plugged in
This task depends upon

Closed by  Jouke Witteveen (jouke)
Friday, 11 May 2012, 19:00 GMT
Reason for closing:  Fixed
Comment by jstjohn (jstjohn) - Thursday, 03 November 2011, 20:39 GMT
Currently, the netcfg wiki instructs users to assign the WIRED_INTERFACE variable in /etc/rc.conf, which clearly does not seem to be the "correct" way of doing things ( https://wiki.archlinux.org/index.php/Netcfg#net-auto-wired ).

So just as a note, if and when this issue gets fixed, the wiki will have to be updated to account for the change, and it may be useful to note this change in the post_install() messages.
Comment by Jouke Witteveen (jouke) - Wednesday, 16 November 2011, 15:46 GMT
The attached patch makes net-auto-wired more like net-auto-wireless, which fixes this bug. I did not test it (no test-case at hand), but do not expect any difficulties.

The only functionality change is that the script now tests whether the daemon was already started or not.

The patch (made by git diff) applies to Remy's tree.

Hopefully netcfg 2.7 can be released soon. The comments of jstjohn on the wiki are worth noting.

Loading...