From ast@marabu.ch  Fri Jun 26 05:32:51 1998
Received: from coyote.instrumatic.ch (coyote.instrumatic.ch [195.226.4.148])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id FAA28807
          for <freebsd-gnats-submit@freebsd.org>; Fri, 26 Jun 1998 05:32:31 -0700 (PDT)
          (envelope-from ast@marabu.ch)
Received: (from root@localhost)
	by coyote.instrumatic.ch (8.8.7/8.8.7/ast-971024) with UUCP id OAA09894;
	Fri, 26 Jun 1998 14:32:07 +0200 (MET DST)
Received: (from uucp@localhost)
	by hawk.marabu.ch (8.8.8/8.8.8) with UUCP id OAA01408;
	Fri, 26 Jun 1998 14:30:06 +0200 (MEST)
	(envelope-from ast@marabu.ch)
Received: by marabu.marabu.ch (8.7.5/970531-ast-7.9) id OAA13800; Fri, 26 Jun 1998 14:25:40 +0200 (CEST)
Received: by NeXT.Mailer (1.118.2)
Message-Id: <199806261225.OAA13800@marabu.marabu.ch>
Date: Fri, 26 Jun 98 14:25:39 +0200
From: Adrian Steinmann <ast@marabu.ch>
To: freebsd-gnats-submit@freebsd.org, ast@iconomic.com
Subject: Re: Problem Report bin/6937

>Number:         7078
>Category:       bin
>Synopsis:       Re: Problem Report bin/6937
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 26 05:40:01 PDT 1998
>Closed-Date:    Sat Jun 27 13:48:44 PDT 1998
>Last-Modified:  Wed Oct 26 05:41:40 GMT 2005
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Sat Jun 27 13:48:44 PDT 1998 
State-Changed-Why:  
Intended as a followup to PR #6937.  The relevant contents of this 
PR have been appended to 6937. 
>Unformatted:
subject=Re: bin/6937: rc.firewall can't be run from network - fix

This is the patch relative to the current rc.firewall

*** rc.firewall-        Fri Jun 26 14:00:34 1998
--- rc.firewall Fri Jun 26 14:00:06 1998
***************
*** 53,58 ****
--- 53,91 ----
        fwcmd="/sbin/ipfw"
  fi

+ # routine to set interfaces down and up
+ interfaces ()
+ {
+     sed="/usr/bin/sed"; fgrep="/usr/bin/fgrep"; ifconfig="/sbin/ifconfig"
+     if [ "x$firewall_quiet" = "xYES" ]; then
+       ifcreport=":"
+     else
+       ifcreport="$ifconfig"
+     fi
+     case "x$1" in
+       xup)
+           for i in `$ifconfig -ad | $sed -ne 's/: .*//p'`; do
+               $ifconfig $i | $fgrep -qs inet 2> /dev/null &&
+                       ( $ifconfig $i up && $ifcreport $i )
+           done
+           ;;
+       xdown)
+           for i in `$ifconfig -au | $sed -ne 's/: .*//p'`; do
+               $ifconfig $i | $fgrep -qs inet 2> /dev/null &&
+                       ( $ifconfig $i down && $ifcreport $i )
+           done
+           ;;
+       *)
+           echo "USAGE: interfaces [up|down]" >&2
+           ;;
+     esac
+ }
+
+ ############
+ # START
+ trap '' 1
+ interfaces down
+
  ############
  # Flush out the list before we begin.
  $fwcmd -f flush
***************
*** 186,188 ****
--- 219,224 ----
  elif [ "${firewall_type}" != "UNKNOWN" -a -r "${firewall_type}" ]; then
        $fwcmd ${firewall_type}
  fi
+ ############
+ # DONE
+ interfaces up

Adrian
_________________________________________________________________________
Dr. Adrian Steinmann  Steinmann Consulting  Apollostrasse 21  8032 Zurich
   Tel +41 1 380 30 83     Fax +41 1 380 30 85    Mailto:ast@marabu.ch
