Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 266721

Summary: sys-apps/baselayout- backgrounds before associating
Product: Gentoo Linux Reporter: Rick Harris <rickfharris>
Component: [OLD] baselayoutAssignee: Gentoo's Team for Core System packages <base-system>
Severity: normal CC: mmokrejs
Priority: High    
Version: 2008.0   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---

Description Rick Harris 2009-04-19 03:30:31 UTC
In sys-apps/baselayout-, /lib/rcscripts/net/ backgrounds itself before associating to an AP.
The result is that network initscripts depending on 'net' fail to start due to the network interface potentially not receiving an IP address yet.

The section of code in question can be seen in wpa_supplicant_associate()...


        [[ -z ${actfile} && ${timeout} -lt 0 ]] && timeout="60"

        if [[ ${timeout} == "0" ]] ; then
                ewarn "WARNING: infinite timeout set for association on ${iface}"
        elif [[ ${timeout} -lt 0 ]] ; then
                einfo "Backgrounding ..."
                exit 0

The script has problems setting the default timeout value.
If 'associate_timeout_${ifvar}' is set in /etc/conf.d/net, then the bug does not present itself.
However if the user intends to just go with the 60 second default listed in /etc/conf.d/net.example, then the bug is present.

The 'if' statment in the line...
[[ -z ${actfile} && ${timeout} -lt 0 ]] && timeout="60"
...will never become true because ${actfile} is always set in wpa_supplicant_pre_start()...
Comment 1 William Hubbs gentoo-dev 2009-12-17 17:12:17 UTC
Please upgrade your system to openrc/baselayout-2.

If this issue still exists after you upgrade, please re-open this bug
and let us know so we can address it in openrc.