From eugen@www.svzserv.kemerovo.su  Mon Mar  3 04:14:29 2003
Return-Path: <eugen@www.svzserv.kemerovo.su>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 9D76837B401
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  3 Mar 2003 04:14:29 -0800 (PST)
Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C3FDA43FCB
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  3 Mar 2003 04:14:27 -0800 (PST)
	(envelope-from eugen@www.svzserv.kemerovo.su)
Received: from www.svzserv.kemerovo.su (eugen@localhost [127.0.0.1])
	by www.svzserv.kemerovo.su (8.12.7/8.12.7) with ESMTP id h23CEOjB022677
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 3 Mar 2003 19:14:24 +0700 (KRAT)
	(envelope-from eugen@www.svzserv.kemerovo.su)
Received: (from eugen@localhost)
	by www.svzserv.kemerovo.su (8.12.7/8.12.7/Submit) id h23CEOIm022674;
	Mon, 3 Mar 2003 19:14:24 +0700 (KRAT)
Message-Id: <200303031214.h23CEOIm022674@www.svzserv.kemerovo.su>
Date: Mon, 3 Mar 2003 19:14:24 +0700 (KRAT)
From: Eugene Grosbein <eugen@www.svzserv.kemerovo.su>
Reply-To: Eugene Grosbein <eugen@www.svzserv.kemerovo.su>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] allow to cancel interface status display
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         48870
>Category:       conf
>Synopsis:       [PATCH] rc.network: allow to cancel interface status display
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-rc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 03 04:20:06 PST 2003
>Closed-Date:    Fri Jan 25 14:17:52 UTC 2008
>Last-Modified:  Fri Jan 25 14:17:52 UTC 2008
>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:
Responsible-Changed-From-To: freebsd-bugs->freebsd-rc 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Jun 29 00:31:56 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=48870 

From: Mike Makonnen <mtm@FreeBSD.Org>
To: bug-followup@FreeBSD.org, eugen@www.svzserv.kemerovo.su
Cc:  
Subject: Re: conf/48870: [PATCH] rc.network: allow to cancel interface
	status display
Date: Fri, 25 Jan 2008 17:09:59 +0300

 Although, the patch is for the pre-rc.d network configuration script,
 the behavior is the same in rc.d. Having, said that, I believe the is
 a completely unnecessary hack. You should convert your script to an rc.d
 script. Then, you don't have to use the kludge of specifying a "bogus"
 network interface to get the rc(8) system to run your scripts for you.
 
 Cheers.
 -- 
 Mike Makonnen         | GPG-KEY: http://people.freebsd.org/~mtm/mtm.asc
 mmakonnen @ gmail.com | AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55
 mtm @ FreeBSD.Org     | FreeBSD - http://www.freebsd.org
State-Changed-From-To: open->closed 
State-Changed-By: mtm 
State-Changed-When: Fri Jan 25 14:10:58 UTC 2008 
State-Changed-Why:  
The patch is for pre-rc.d netwrork scripts, and doesn't seem to offer 
the wider FreeBSD community any benefits. It 's only purpose is to 
hidde unwanted output because of a local hack , which there is a better 
way of implementing anyway. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=48870 
>Unformatted:
