From owner-freebsd-bugs@FreeBSD.ORG Wed Sep 20 19:40:27 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C936A16A403 for ; Wed, 20 Sep 2006 19:40:27 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9222543D49 for ; Wed, 20 Sep 2006 19:40:27 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k8KJeRK2074231 for ; Wed, 20 Sep 2006 19:40:27 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k8KJeR2m074230; Wed, 20 Sep 2006 19:40:27 GMT (envelope-from gnats) Date: Wed, 20 Sep 2006 19:40:27 GMT Message-Id: <200609201940.k8KJeR2m074230@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Brooks Davis Cc: Subject: Re: conf/103428: devd(8): devd brings up network interfaces early and wrong X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Brooks Davis List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2006 19:40:27 -0000 The following reply was made to PR conf/103428; it has been noted by GNATS. From: Brooks Davis To: Rob Austein Cc: freebsd-gnats-submit@freebsd.org Subject: Re: conf/103428: devd(8): devd brings up network interfaces early and wrong Date: Wed, 20 Sep 2006 14:38:47 -0500 I'm a bit confused by this one. It's true devd now starts earlier and could start before network_ipv6, but it starts after netif and you have an IPv4 address configured so it should be up by the time devd starts up. One possible issue is that the current check is bypased if grep isn't available (say if /usr is an nfs mount). If that's the case for you, the following patch may fix things. The other thing I can think of is that there's a delay in the interface transitioning to the UP state. If that's the case I'm not sure what the answer is. We might need to use something else to de-bounce the interface configuration. It might be worth a try to modify etc/rc.d/devd to run after network_ipv6. -- Brooks Index: pccard_ether =================================================================== RCS file: /home/ncvs/src/etc/pccard_ether,v retrieving revision 1.50 diff -u -p -r1.50 pccard_ether --- pccard_ether 18 Aug 2006 13:19:45 -0000 1.50 +++ pccard_ether 20 Sep 2006 19:34:13 -0000 @@ -69,11 +69,13 @@ pccard_ether_start() { ifexists $ifn || exit 1 - if [ -z "$rc_force" -a -x /usr/bin/grep ]; then - if ifconfig $ifn | grep -s '[<,]UP[,>]' > /dev/null 2>&1; then - # Interface is already up, so ignore it. - exit 0 - fi + if [ -z "$rc_force" ]; then + for uif in `ifconfig -ul`; do + if [ "${uif}" = "${ifn}" ]; then + # Interface is already up, so ignore it. + exit 0 + fi + done fi /etc/rc.d/netif start $ifn