From 4255f154975cc07d3d2a1e5af9a6dd37efac486d Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Tue, 12 Jun 2012 22:48:17 +0200 Subject: Don't wait unnecessarily on bring_interface up Good drivers indicate when they're up by the IFF_UP flag. This is the end of the (undocumented) UP_SLEEP variable and introduction of the UP_TIMEOUT (in seconds, default: 5) variable. This has 'noticeable speed improvement'-potential. --- scripts/wifi-menu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/wifi-menu') diff --git a/scripts/wifi-menu b/scripts/wifi-menu index 1140b85..1f0e423 100755 --- a/scripts/wifi-menu +++ b/scripts/wifi-menu @@ -206,7 +206,7 @@ fi cd / # We do not want to spawn anything that can block unmounting is_interface "$INTERFACE" || exit_fail "No such interface: $INTERFACE" -if [[ -z "$(ip link show dev "$INTERFACE" up 2> /dev/null)" ]]; then +if ! interface_is_up "$INTERFACE"; then [[ -f "$IFACE_DIR/$INTERFACE" ]] && . "$IFACE_DIR/$INTERFACE" bring_interface up "$INTERFACE" || exit_fail "Interface unavailable" SPAWNED_INTERFACE=1 -- cgit v1.2.3-24-g4f1b