Subject: Re: shell scripts in an emulation environment
To: Matthias Drochner <drochner@zelux6.zel.kfa-juelich.de>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-kern
Date: 01/28/1998 14:57:32
>Excerpts from netbsd: 27-Jan-98 shell scripts in an emulati.. Bill
>Studenmund@loki.sta (1628*)

>> The problem is that it for normal NetBSD users, it ends up being run by
>> NetBSD's /bin/sh.  I'd prefer the matlab script be run by /emul/OS/bin/sh.

>I had this problem too several times. It seems quite common
>to determine the system type by"uname" not only in the
>installation process but at runtime too.

I think we have a conflict of interest here.

For some purposes, NetBSD would like to use the `native' uname()
return value.  (e.g., when building OS-ident strings returned by Web
browsers running on NetBSD under emulation).

For other purposes, like ``portable'' shell scripts running under
emulation, we'd like to return the uname() for the emulated OS, to
make case calls in the shell script work.  
I don't see how we can easily get both.

That aside, I think Bill's idea of searching under /emul/<OS> for
#!-path interpreters is correct: some shell scripts may depend on bug
compatiblity (or just version differences) with a given vendor shell.