NetBSD Problem Report #220
From gnats Sat Apr 9 14:56:36 1994
Received: from sun2.nsfnet-relay.ac.uk (sun2.nsfnet-relay.ac.uk [128.86.8.45]) by sun-lamp.cs.berkeley.edu (8.6.8/8.6.6) with SMTP id OAA00724 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sat, 9 Apr 1994 14:56:34 -0700
Message-Id: <19047.9404091954@landin.ecs.soton.ac.uk>
Date: Sat, 9 Apr 1994 20:54:52 +0100 (BST)
From: Bob Kemp <rsk@ecs.soton.ac.uk>
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: no subject (file transmission)
>Number: 220
>Category: misc
>Synopsis: globbing error in /etc/netstart when no interfaces ($IFS)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: gnats-admin
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Apr 09 15:05:03 +0000 1994
>Closed-Date: Sun Apr 10 00:28:36 +0000 1994
>Last-Modified:
>Originator: Bob Kemp
>Release: -current 05Mar94
>Organization:
ECS Dept, Southampton Univ, UK
>Environment:
System: NetBSD allegory 0.9a ALLEGORY#0 i386
>Description:
/etc/netstart modifies $IFS to include "." but
then uses a filename including an explicit "."
The intention is that (eg)
/etc/hostname.lo1
will be broken into
/etc/hostname lo1
thus giving the interface and (in /etc/hostname.lo1)
configuration details. Nice idea!
However, if there are no interfaces /bin/sh
globs it wrongly. I think what happens is
set -- `echo /etc/hostname.*`
expands to
set -- /etc/hostname.*
because there are no /etc/hostname.* files
(hence globbing for echo fails and leaves it unchanged)
Next, the command is again broken into words and
becomes
set -- /etc/hostname *
which by globbing becomes
set -- /etc/hostname SAFE aliases aliases.db csh.cshrc csh.login csh.logout daily defaultdomain disktab disktab.ORIG dm.conf dumpdates exports fstab ftpusers gettytab group hosts hosts.equiv hosts.lpd inetd.conf localtime magic mail.rc man.conf master.passwd monthly motd mtree myname namedb netstart netstart.orig newsyslog.conf passwd phones portal.conf printcap protocols pwd.db rc rc.local remote rpc security sendmail.cf services shells spwd.db syslog.conf ttys uucp vntab weekly
Not quite what was wanted :-)
You can verify it by trying the following script.
#!/bin/sh
IFS=".$IFS"
echo 1 `echo /etc/Zhostname.*` # original
echo 2 `echo /etc/Zhostname*` # suggested change
>How-To-Repeat:
Run the above script or do
cd /etc
mkdir SAFE
mv /etc/hostname.* SAFE
fastboot
>Fix:
*** /etc/netstart.orig Sat Mar 26 12:27:20 1994
--- /etc/netstart Sat Apr 9 16:12:11 1994
***************
*** 57,63 ****
(
tmp="$IFS"
IFS="$IFS."
! set -- `echo /etc/hostname.*`
IFS=$tmp
unset tmp
--- 57,63 ----
(
tmp="$IFS"
IFS="$IFS."
! set -- `echo /etc/hostname*`
IFS=$tmp
unset tmp
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: cgd
State-Changed-When: Sat Apr 9 17:28:36 PDT 1994
State-Changed-Why:
fixed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.