Has anyone implemented Variant Links on Suns?
Dan Smith
island!daniel at uunet.uu.net
Fri Feb 2 06:59:33 AEST 1990
[Skip the first part if you are already familiar with VL's]
I really enjoy using Suns, and recently started using an Apollo as well
for a project. One thing that I like in their setup is Variant Links. In
a nutshell, the value of an environment variable is used to help resolve a
symbolic link. They have something like:
usr ---> $(SYSTYPE)/usr
so that if $SYSTYPE is "4.3bsd", you get /4.3bsd/usr, and if it is
"5.3sysv", you get /5.3sysv/usr. If $SYSTYPE is undefined you end up
going nowhere.
[end of first part...]
I see where variant links would come in handy for allowing several
versions of software to coexist in the "same" place. Specifically, I
would love to be able to put X11R3, R3 with Motif, and R4 in the "same"
place, a la:
/usr/include/X11 --> $(XVERSION)/include/X11 or
--> /usr/include/$(XVERSION)
That way users would just have an environment variable pointing to what
they need, and everyone could still go on speaking of "/usr/include/X11"
in a generic sense. There are so many applications for this! I think
that if the env var is not set, then you should end up at (literal)
$(FOO)/whatever, in order to be compatible with some application/user that
put "$(" in their filenames (beats me why anyone would do that. but then
again...)
I think this would have to be done at the kernel level, in order to be
transparent to applications. I'm guessing it would be a small change to
whatever looks up symbolic links (look for a $(VAR) element, resolve it,
and insert it into the pathname).
Wish I had the source (nope, I'm not an adb hack!)... Anyone ever do
this? (Donning an asbestos overcoat :-)
dan
dansmith at well.sf.ca.us daniel at island.uu.net unicom!daniel at pacbell.com
ph: (415) 332 3278 (h), 491 1000 (w) disclaimer: Island's coffee was laced :-)
More information about the Comp.sys.sun
mailing list