Subject: misc/3635: /etc/netstart doesn't configure lo0 if net_interfaces is DEFAULT
To: None <gnats-bugs@gnats.netbsd.org>
From: None <enami@ba2.so-net.or.jp>
List: netbsd-bugs
Date: 05/17/1997 13:43:04
>Number:         3635
>Category:       misc
>Synopsis:       /etc/netstart doesn't configure lo0 if net_interfaces is DEFAULT and ifconfig args for lo0 isn't defined with file ifconfig_lo0 or shell variable ifconfig_lo0.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 16 21:50:01 1997
>Last-Modified:
>Originator:     enami tsugutomo
>Organization:
	an individual
>Release:        NetBSD-current 1997May15
>Environment:
System: NetBSD pavlov.enami.ba2.so-net.or.jp 1.2E NetBSD 1.2E (PAVLOV) #249: Sat May 10 11:42:39 JST 1997 enami@pavlov.enami.ba2.so-net.or.jp:/b/netbsd/kernel/compile/PAVLOV i386


>Description:
	/etc/netstart doesn't configure lo0 if net_interfaces is DEFAULT
	and ifconfig args for lo0 isn't defined with file ifconfig_lo0 or
	shell variable ifconfig_lo0.

>How-To-Repeat:
	Install recent netstart to /etc and reboot system which has ed0
	and lo0 but only ifconfig_ed0 is defined and net_interface is
	set to DEFAULT.

>Fix:
	Make sure loop is continue'ed when interface is not configured.
	Here is my fix:

Index: netstart
===================================================================
RCS file: /a/cvsroot/NetBSD/etc/netstart,v
retrieving revision 1.1.1.6
diff -u -r1.1.1.6 netstart
--- netstart	1997/05/17 02:32:42	1.1.1.6
+++ netstart	1997/05/17 04:29:38
@@ -62,11 +62,13 @@
 			(while read args; do
 				ifconfig $int $args
 			done) < /etc/ifconfig.$int
-		elif [ "$net_interfaces" != DEFAULT ]; then
-			echo
-			echo -n "/etc/ifconfig.$int missing"
- 			echo -n "& ifconfig_$int not set"
-			echo "; interface $int can't be configured"
+		else
+			if [ "$net_interfaces" != DEFAULT ]; then
+				echo
+				echo -n "/etc/ifconfig.$int missing"
+ 				echo -n "& ifconfig_$int not set"
+				echo "; interface $int can't be configured"
+			fi
 			continue
 		fi
 		if [ "$int" = "lo0" ]; then
>Audit-Trail:
>Unformatted: