From smp@rick.systemsix.com  Fri Mar 17 21:47:43 1995
Received: from rick.systemsix.com (rick.systemsix.com [198.99.86.136]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id VAA13090 for <FreeBSD-gnats-submit@freebsd.org>; Fri, 17 Mar 1995 21:47:31 -0800
Received: (from smp@localhost) by rick.systemsix.com (8.6.9/8.6.9) id WAA04477; Fri, 17 Mar 1995 22:48:45 -0700
Message-Id: <199503180548.WAA04477@rick.systemsix.com>
Date: Fri, 17 Mar 1995 22:48:45 -0700
From: smp@clem.systemsix.com
Reply-To: smp@clem.systemsix.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: bug in /etc/netstart
X-Send-Pr-Version: 3.2

>Number:         250
>Category:       conf
>Synopsis:       /etc/netstart executes undesired hostname.xxx files
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 17 21:50:00 1995
>Closed-Date:    Mon Apr 10 18:32:09 PDT 1995
>Last-Modified:
>Originator:     Steve Passe
>Release:        FreeBSD 2.1.0-Development i386
>Organization:
New Ideas
>Environment:

	950210-SNAP, GENERIC kernel

>Description:

	/etc/netstart may attempt to execute unwanted hostname.xxx
	files.  This has variuos effects, from none to wedging the
	system.  The specific problem is that the line:

	ifn=`expr $i : '/etc/hostname\.\(.*\)'`

	will return the end of ANY filename starting with "/etc/hostname."
	Eg., if one copies hostname.ed0 to hostname.ed0.HIDE netstart will
	evaluate it anyway.  I was bitten by an emacs backup file (ie,
	hostname.ed0~)

>How-To-Repeat:

	use emacs to edit hostname.ed0, changing some vital field.
	Reboot the kernel.  netstart will attempt to run ifconfig on both
	hostname.ed0 AND hostname.ed0~

>Fix:
	
	edit /etc/netstart:

< 	ifn=`expr $i : '/etc/hostname\.\(.*\)'`
---
> 	ifn=`expr $i : '/etc/hostname\.\(.*[0-9]$\)'`

The above fix was not ideal, instead use a variable as a list of
interfaces and a set of variables, one per interface to contain
the data.  Totally eliminate the /etc/hostname.* files.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: rgrimes 
State-Changed-When: Mon Apr 10 18:32:09 PDT 1995 
State-Changed-Why:  
Fixed by netstart 1.27, rc 1.62 and sysconfig 1.10 
>Unformatted:




