Subject: Re: shell scripts in an emulation environment
To: Jonathan Stone <email@example.com>
From: Bill Studenmund <firstname.lastname@example.org>
Date: 01/28/1998 15:59:11
On Wed, 28 Jan 1998, Jonathan Stone wrote:
> >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.
I think we have the kernel doing the right thing (reporting NetBSD). I
generally just make /emul/OS/bin/uname == "echo OS" (ULTRIX or Linux). If
we wanted both values on the same machine, we'd need to play tricks (like
have the script somehow figure out who's calling it and react
> 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.
Ok. Any suggestions on how to do it? :-)