Date: Wed, 20 Sep 2006 19:40:27 GMT From: Brooks Davis <brooks@one-eyed-alien.net> To: freebsd-bugs@FreeBSD.org Subject: Re: conf/103428: devd(8): devd brings up network interfaces early and wrong Message-ID: <200609201940.k8KJeR2m074230@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR conf/103428; it has been noted by GNATS. From: Brooks Davis <brooks@one-eyed-alien.net> To: Rob Austein <sra@hactrn.net> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609201940.k8KJeR2m074230>