NetBSD Problem Report #4105

Received: (qmail 4425 invoked from network); 12 Sep 1997 18:46:36 -0000
Message-Id: <199709121846.OAA25053@bach.mc.com>
Date: Fri, 12 Sep 1997 14:46:24 -0400
From: "Gordon W. Ross" <gwr@mc.com>
To: gnats-bugs@gnats.netbsd.org
Subject: etc.sun3/MAKEDEV works only on NetBSD
X-Send-Pr-Version: 3.2

>Number:         4105
>Category:       port-sun3
>Synopsis:       etc.sun3/MAKEDEV works only on NetBSD
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-sun3-maintainer
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 12 11:50:02 +0000 1997
>Closed-Date:    Sat Sep 29 04:09:44 +0000 2001
>Last-Modified:  Sat Sep 29 04:09:53 +0000 2001
>Originator:     Gordon W. Ross
>Release:        NetBSD-current as of 1997/08/15
>Organization:
NetBSD
>Environment:
	Server is Solaris 2.5 (sparc)
	Client is NetBSD/sun3, but this problem
	  exists on all types of NetBSD clients.

>Description:
	Try to prepare an NFS server for your diskless
	NetBSD client.  When you run MAKEDEV it says:
	MAKEDEV: syntax error at line 126: `n=$' unexpected

>How-To-Repeat:
	mkdir /export/myclient
	cd /export/myclient
	gzip -d .../dev.tar.gz | tar xvf -
	cd dev
	sh MAKEDEV

>Fix:
	Eliminate NetBSD-specific shell features from MAKEDEV.
	Note that it used to run on SunOS and Solaris before
	the "enhancements to eliminate expr" were done.

>Release-Note:
>Audit-Trail:

Date: Wed, 17 Dec 1997 16:41:37 +1100 (EST)
From: "Simon J. Gerraty" <sjg@notboss.cdn.telstra.com.au>
To: current-users@NetBSD.ORG
Subject: dev/MAKEDEV not portable

Sounds silly doesn't it.

However, for the purpose of building a diskless environment on a
non-NetBSD server, it would be handy if:

a) there were a dev.tgz package or
b) dev/MAKEDEV could be run on the server.

At present the use of cute features like $(($unit + 16)) etc
rules out b.  `expr ` may be sub-optimal, but for something that gets
run only once or twice in the lifetime of a system, optimization is
a non-issue.

If we take the dev.tgz approach, it should at least contain
/dev/console as the system will not boot (usefully anyway) without it.

---sjg

Date: Wed, 17 Dec 1997 11:23:00 -0500
From: "Gordon W. Ross" <gwr@mc.com>
To: sjg@notboss.cdn.telstra.com.au
Cc: gnats-bugs@gnats.netbsd.org
In-Reply-To: <19970912185003.4763.qmail@mail.NetBSD.ORG> 
	(gnats-bugs@gnats.netbsd.org)
From: "Gordon W. Ross" <gwr@bach>
To: sjg@notboss.cdn.telstra.com.au
CC: current-users@NetBSD.ORG
In-reply-to: <199712170541.QAA24409@notboss.dn.itg.telecom.com.au>
	(sjg@notboss.cdn.telstra.com.au)
Subject: Re: dev/MAKEDEV not portable
Content-Length: 858
> Date: Wed, 17 Dec 1997 16:41:37 +1100 (EST)
> From: "Simon J. Gerraty" <sjg@notboss.cdn.telstra.com.au>
> 
> Sounds silly doesn't it.

Not to me.  See PR bin/4105

> However, for the purpose of building a diskless environment
> on a non-NetBSD server, it would be handy if:
> 
> a) there were a dev.tgz package or
Most versions of tar do not extract device nodes...

> b) dev/MAKEDEV could be run on the server.
Very easy to accomplish if the MAKDEDEV script uses
only vanilla (POSIX complient!) shell features.

> At present the use of cute features like $(($unit + 16)) etc
> rules out b.  `expr ` may be sub-optimal, but for something that gets
> run only once or twice in the lifetime of a system, optimization is
> a non-issue.

Exactly.  Actually, there are other ways to avoid some of the
arithmetic, such as putting pre-computed lists in MAKEDEV.


Responsible-Changed-From-To: bin-bug-people->gnats-admin 
Responsible-Changed-By: fair 
Responsible-Changed-When: Thu Nov 20 00:53:06 PST 1997 
Responsible-Changed-Why:  
PR moved from category "bin" to "port-sun3"; examination of all other 
MAKEDEV scripts shows that only the sun3 MAKEDEV uses "advanced" bourne 
shell features (which, alas, render it inoperable on systems that have 
old bourne shells installed, as the PR notes). 
Responsible-Changed-From-To: gnats-admin->port-sun3-maintainer 
Responsible-Changed-By: fair 
Responsible-Changed-When: Mon Dec 28 09:28:39 PST 1998 
Responsible-Changed-Why:  
This PR is the responsibility of the portmaster, 
not the GNATS database administrator. 
State-Changed-From-To: open->closed 
State-Changed-By: chs 
State-Changed-When: Fri Sep 28 21:07:42 PDT 2001 
State-Changed-Why:  
at this point all ports use the newer features in MAKEDEV, 
so there doesn't seem much point in switching back. 
people can always build bash or pdksh or whatever if 
they really need to run MAKEDEV on an OS that has an old sh. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.