From owner-freebsd-current Tue Aug 13 8: 3:34 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A53337B400 for ; Tue, 13 Aug 2002 08:03:27 -0700 (PDT) Received: from nuit.iteration.net (nuit.iteration.net [198.92.249.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id DDC4143E42 for ; Tue, 13 Aug 2002 08:03:26 -0700 (PDT) (envelope-from keichii@nuit.iteration.net) Received: by nuit.iteration.net (Postfix, from userid 1001) id 5BFAB11B5AE; Tue, 13 Aug 2002 08:01:24 -0700 (PDT) Date: Tue, 13 Aug 2002 08:01:24 -0700 From: "Michael C. Wu" To: "Vladimir B. Grebenschikov" Cc: "current@freebsd.org" Subject: Re: rcNG and dhcp Message-ID: <20020813150124.GA88021@nuit.iteration.net> Reply-To: "Michael C. Wu" References: <1029141620.800.14.camel@vbook.express.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1029141620.800.14.camel@vbook.express.ru> User-Agent: Mutt/1.3.28i X-PGP-Fingerprint: 5025 F691 F943 8128 48A8 5025 77CE 29C5 8FA1 2E20 X-PGP-Key-ID: 0x8FA12E20 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Aug 12, 2002 at 12:40:20PM +0400, Vladimir B. Grebenschikov scribbled: | | Hi | | There is patch to teach rcNG do not try dhcp on not-connected ethernet. | | simply put | ifconfig_fxp0="dhcp-if-carrier" | into rc.conf | | It will be interested to somebody | | Theoretically there are another solution for problem - add new key to | dhclient - check interface media before broadcasting. I think that most network related stuff should do this as an added function by user choice. For example, no NFS if interface does not exist. Michael | | -- | Vladimir B. Grebenschikov | vova@sw.ru, SWsoft, Inc. | --- /usr/local/src/etc/rc.d/network1 Mon Jul 29 15:09:46 2002 | +++ /etc/rc.d/network1 Mon Aug 12 11:43:03 2002 | @@ -157,6 +157,17 @@ | case ${ifconfig_args} in | '') | ;; | + [Dd][Hh][Cc][Pp]-[Ii][Ff]-[Cc][Aa][Rr][Rr][Ii][Ee][Rr]) | + # Load interface .ko if need | + ifconfig $ifn > /dev/null 2>&1 | + sleep 3 | + # Check media option of interface | + media=`ifconfig $ifn | awk '($1 == "media:") { ok=1; print $4; } END { if (ok != 1) { print "(none)"; } }' 2> /dev/null` | + if [ "$media" != "(none)" ]; then | + dhcp_interfaces="$dhcp_interfaces $ifn" | + eval showstat_$ifn=1 | + fi | + ;; | [Dd][Hh][Cc][Pp]) | # DHCP inits are done all in one go below | dhcp_interfaces="$dhcp_interfaces $ifn" ------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message