Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jul 1998 04:14:23 -0400
From:      Garance A Drosihn <drosih@rpi.edu>
To:        Mike Smith <mike@smith.net.au>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Variant Link implementation, continued
Message-ID:  <v04011724b1c38fb1854d@[128.113.24.47]>
In-Reply-To: <199807040228.TAA07480@antipodes.cdrom.com>
References:  Your message of "Fri, 03 Jul 1998 16:13:48 EDT."             <v04011723b1c2dd579a5c@[128.113.24.47]>

next in thread | previous in thread | raw e-mail | index | archive | help
>> Now that I've caught up on my sleep a bit, I do think something
>> along these lines could be promising.  I can't find Terry's
>> earlier suggestion (even though I know I reread it just last
>> night), but I think that what I want might not be all that much
>> different from what he suggested.
>>
>> Let's say there are three namespaces (just to pick a number):
>>      sys
>>      session
>>      process
>
> This is immediately bad, in that you want a name from the 'session'
> namespace to be able to (optionally) override a matching name from
> the 'sys' namespace.

I don't see the problem.  Which is to say, my proposal was intended
to let people do just exactly what you are asking for.

Let's say that the "sys" namespace has a variable called "osversion".
This value is read-only to most users (except root), and is set to
the version of freebsd that the machine is actually running.

The login process may very well copy that "osversion" value to a
variable in the "session" namespace which is also called "osversion".
Users can not change the copy of oslevel in the "sys" namespace,
but they can change the value which is in the "session" namespace.

Why would I suggest that we bother having the exact same variable
name in both namespaces?  So that a person who creates a symlink
can say "this symlink *must* key off the *real* version of freebsd
that the operating system is running".  Another person on the same
machine may be using "osversion" to mean "the version of freebsd
that I am compiling packages for".  For that purpose, you do want
the default value to be the same as the real osversion the system
is running, but you don't really care if the user wants to specify
some other version.

Now, if you think about that and then reread what I wrote in the
earlier message, you'll see that the login process doesn't really
have any need to copy any variables in the "sys" namespace to the
"session" namespace.  Why?  Because if variant symlink refers to
${session:somevar}, and the session namespace has no variable
named "somevar", then that link will get the value in the "sys"
namespace (assuming the "sys" namespace has one).

So when any user creates a variant symlink, they can either
refer to ${sys:osversion} or ${session:osversion}.  The only
difference between the two is that the second one allows other
users to redirect the symlink, via whatever unix command is
used to add or modify values in the session namespace.


---
Garance Alistair Drosehn           =   gad@eclipse.its.rpi.edu
Senior Systems Programmer          or  drosih@rpi.edu
Rensselaer Polytechnic Institute

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?v04011724b1c38fb1854d>