Moinak Ghosh wrote:
Frank Van Der Linden wrote:
Moinak Ghosh wrote:

  Nexenta has a very nice approach to this problem. You can set an
environment variable to control your userland environment personality.
  I believe they have hooks into exec to determine the personality of
  the caller and automatically resolve binaries from /usr/sun if
  SUN_PERSONALITY == 1.

  Avoids having to fiddle around with your PATH. It is per-process
  so you can execute a command that expects a Solaris compatible env
  just by setting this variable from a GNU env thusly:
  SUN_PERSONALITY=1 <cmd>.
That sounds like a better approach, although the problem with that kind of magic is that it's not transparent. I wonder, for example, how that would work with something like the internal executable path table that *csh has. Or with commands such as 'which' and 'type'.

It is in fact completely transparent since the path translation happens in the
  kernel side of the the exec syscall.

I have seen something similar used in the past to get around CPU instruction set differences. On Sony's (Yes Sony) version of BSD (possibly others), they were able to use an environment variable within a symbolic link. It actually worked really well. There have been many times since when I could have used it on other versions of Unix.

Doug

_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to