From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1S3YZM-0002wq-I8 for garchives@archives.gentoo.org; Fri, 02 Mar 2012 19:55:12 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C1CBAE08E0; Fri, 2 Mar 2012 19:55:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 973EAE08E0 for ; Fri, 2 Mar 2012 19:55:05 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0AF751B4030 for ; Fri, 2 Mar 2012 19:55:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id C8421E542C for ; Fri, 2 Mar 2012 19:55:03 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1330718088.7a1e4ef606a814b124fc35136c2821484981e6cb.robbat2@gentoo> Subject: [gentoo-commits] proj/openrc:master commit in: net/ X-VCS-Repository: proj/openrc X-VCS-Files: net/ifconfig.sh.Linux.in net/iproute2.sh X-VCS-Directories: net/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 7a1e4ef606a814b124fc35136c2821484981e6cb X-VCS-Branch: master Date: Fri, 2 Mar 2012 19:55:03 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 1e85b0ee-72dd-4584-90e4-670a45627edb X-Archives-Hash: eaf62a7dd4297c3c2fb1902d3bb959c0 commit: 7a1e4ef606a814b124fc35136c2821484981e6cb Author: Robin H. Johnson gentoo org> AuthorDate: Fri Mar 2 19:54:48 2012 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Fri Mar 2 19:54:48 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3D7a1e4ef6 Bug #405491: _exists can give a false negative since /proc/net/dev can be= slow to update sometimes when interfaces are added rapidly. Use sysfs in= stead. Signed-off-by: Robin H. Johnson gentoo.org> --- net/ifconfig.sh.Linux.in | 2 +- net/iproute2.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ifconfig.sh.Linux.in b/net/ifconfig.sh.Linux.in index 80a0b98..9eaa7c5 100644 --- a/net/ifconfig.sh.Linux.in +++ b/net/ifconfig.sh.Linux.in @@ -19,7 +19,7 @@ _down() =20 _exists() { - grep -Eq "^[[:space:]]*${IFACE}:" /proc/net/dev + [ -e /sys/class/net/"$IFACE" ] } =20 _ifindex() diff --git a/net/iproute2.sh b/net/iproute2.sh index 09912bf..e06152f 100644 --- a/net/iproute2.sh +++ b/net/iproute2.sh @@ -20,7 +20,7 @@ _down() =20 _exists() { - grep -Eq "^[[:space:]]*${IFACE}:" /proc/net/dev + [ -e /sys/class/net/"$IFACE" ] } =20 _ifindex()