Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 266721 - sys-apps/baselayout-1.12.11.1 wpa_supplicant.sh backgrounds before associating
Summary: sys-apps/baselayout-1.12.11.1 wpa_supplicant.sh backgrounds before associating
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-19 03:30 UTC by Rick Harris
Modified: 2009-12-17 17:12 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Harris 2009-04-19 03:30:31 UTC
In sys-apps/baselayout-1.12.11.1, /lib/rcscripts/net/wpa_supplicant.sh 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()...

        timeout="associate_timeout_${ifvar}"
        timeout="${!timeout:--1}"

        [[ -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
        fi

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()...
actfile="/etc/wpa_supplicant/wpa_cli.sh"
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.