Subject: install/8068: 1.4 install.sh displays bogus network defaults
To: None <gnats-bugs@gnats.netbsd.org>
From: Andreas Gustafsson <gson@araneus.fi>
List: netbsd-bugs
Date: 07/25/1999 03:08:56
>Number: 8068
>Category: install
>Synopsis: 1.4 install.sh displays bogus network defaults
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: install-manager (NetBSD system installation bug manager)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jul 25 02:35:00 1999
>Last-Modified:
>Originator: Andreas Gustafsson
>Organization:
Araneus Information Systems Oy
>Release: 1.4
>Environment:
System: NetBSD gus.araneus.fi 1.4 NetBSD 1.4 (GENERIC) #0: Sun May 9 03:00:22 MEST 1999 pk@flambard:/usr/src/sys/arch/sparc/compile/GENERIC sparc
>Description:
When installing NetBSD 1.4 on a SPARCstation IPX using
NetBSD-1.4/sparc/installation/netboot/install.sh, the default values
displayed when prompting for the IP adddress and netmask are bogus.
The default shown for the IP address is the string "status:" (!), and
the default for the netmask is the string "active".
Also, the network media type is incorrectly set to "Ethernet" instead
of something like "10base5". This cause error messages from ifconfig
when booting.
>How-To-Repeat:
Run install.sh. See the following prompts:
IP address? [status:]
Netmask? [active]
After finishing the installation, reboot the system and see the
following error message:
ifconfig: unknown ethernet media type subtype: Ethernet
The bug is caused by incorrect parsing of the output from ifconfig in
the install.sub script. Apparently the format of the ifconfig output
has changed, but install.sub has not been updated accordingly. The
actual output of "ifconfig le0" looks like this:
le0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
media: Ethernet 10base5
status: active
inet 194.100.32.85 netmask 0xfffffff8 broadcast 194.100.32.87
but the code in install.sub seems to assume that neither the word
"Ethernet" nor the "status: active" line is there.
>Fix:
--- install.sub.orig Sun Jul 25 10:51:55 1999
+++ install.sub Sun Jul 25 11:49:56 1999
@@ -384,12 +384,15 @@
3s/supported media: //p'`
set -- `ifconfig $_interface_name | sed -n '
- 2s/media: \([^ ][^ ]*\).*/\1/p
- 3s/inet//
- 3s/--> [0-9.][0-9.]*//
- 3s/netmask//
- 3s/broadcast//
- 3p'`
+ /media: /s/Ethernet //
+ s/media: \([^ ][^ ]*\).*/\1/p
+ /inet /{
+ s/inet//
+ s/--> [0-9.][0-9.]*//
+ s/netmask//
+ s/broadcast//
+ p
+ }'`
if [ "$1" != "manual" ]; then
_interface_mediumtype=$1
>Audit-Trail:
>Unformatted: