Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Mar 2003 19:14:24 +0700 (KRAT)
From:      Eugene Grosbein <eugen@www.svzserv.kemerovo.su>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   misc/48870: [PATCH] allow to cancel interface status display
Message-ID:  <200303031214.h23CEOIm022674@www.svzserv.kemerovo.su>

next in thread | raw e-mail | index | archive | help

>Number:         48870
>Category:       misc
>Synopsis:       [PATCH] allow to cancel interface status display
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 03 04:20:06 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Eugene Grosbein
>Release:        FreeBSD 4.8-PRERELEASE i386
>Organization:
Svyaz Service JSC
>Environment:
System: FreeBSD www.svzserv.kemerovo.su 4.8-PRERELEASE FreeBSD 4.8-PRERELEASE #7: Tue Feb 25 15:49:18 KRAT 2003 eu@www.svzserv.kemerovo.su:/home4/obj/home2/src/sys/WWW i386

>Description:
	It is not possible to overide showstat_$ifn from /etc/start_$ifn.

>How-To-Repeat:
	I need to setup variable number of gre(4) interfaces at startup.
	I've a script that has its own configuration for this job.

	So I write in /etc/rc.conf:

	network_interfaces="de0 lo0 gre"

	And I create script /etc/start_gre that configures tunnels.
	The script shows their status itself using ifconfig.

	I'm trying to prevent /etc/rc.network from showing state of
	nonexistent interface 'gre' by specifying showstat_gre=''
	in my script but that does not work because /etc/rc.network
	overrides showstat_gre _after_ invocation of /etc/start_gre.

>Fix:

	Apply this patch to /etc/rc.network so that it will
	set showstat_$ifn _before_ invocation of /etc/start_$ifn
	allowing variable showstat_$ifn be redefined there.

--- rc.network.orig	Mon Mar  3 19:02:01 2003
+++ rc.network	Mon Mar  3 19:01:46 2003
@@ -194,8 +194,8 @@
 	dhcp_interfaces=""
 	for ifn in ${network_interfaces}; do
 		if [ -r /etc/start_if.${ifn} ]; then
-			. /etc/start_if.${ifn}
 			eval showstat_$ifn=1
+			. /etc/start_if.${ifn}
 		fi
 
 		# Do the primary ifconfig if specified


Eugene Grosbein
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303031214.h23CEOIm022674>