Article View: comp.sys.sun
Article #13559Has anyone implemented Variant Links on Suns?
From: Dan Smith
Date: Thu, 01 Feb 1990 19:59
Date: Thu, 01 Feb 1990 19:59
44 lines
2327 bytes
2327 bytes
[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@well.sf.ca.us daniel@island.uu.net unicom!daniel@pacbell.com
ph: (415) 332 3278 (h), 491 1000 (w) disclaimer: Island's coffee was laced :-)
Technical Details
Message-ID:
<4681@brazos.Rice.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!rice!sun-spots-requestShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!rice!sun-spots-request From: island!daniel@uunet.uu.net (Dan Smith) Newsgroups: comp.sys.sun Subject: Has anyone implemented Variant Links on Suns? Keywords: Miscellaneous Message-ID: <4681@brazos.Rice.edu> Date: 1 Feb 90 19:59:33 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 44 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 9, Issue 24, message 3 of 15