Date: 12 Aug 2002 12:40:20 +0400 From: "Vladimir B. " Grebenschikov <vova@sw.ru> To: "current@freebsd.org" <current@freebsd.org> Subject: rcNG and dhcp Message-ID: <1029141620.800.14.camel@vbook.express.ru>
index | next in thread | raw e-mail
[-- Attachment #1 --]
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.
--
Vladimir B. Grebenschikov
vova@sw.ru, SWsoft, Inc.
[-- Attachment #2 --]
--- /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"
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1029141620.800.14.camel>
