Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jun 1998 13:49:06 -0400 (EDT)
From:      "Matthew N. Dodd" <winter@jurai.net>
To:        wjw@IAEhv.nl
Cc:        mike@smith.net.au, current@FreeBSD.ORG
Subject:   Re: Variant Link implementation (Was: Re: lorder problem: ....... )
Message-ID:  <Pine.BSF.3.96.980608133507.17992A-100000@sasami.jurai.net>
In-Reply-To: <199806081606.SAA29892@surf.IAEhv.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 8 Jun 1998, Willem Jan  Withagen wrote:
> =>  Would it not be nicer to introduce a new file/link type?  This would allow
> =>  lower overall cost as you would not have to scan each link, only those
> =>  links of the proper type.
> 
> That's one way of doing it. Is was first thinking of doing it through sysctl
> for the whole system on or off. But then that is a sort of blunt axe
> solution.

I suppose I should have included some code for proper context but the
example appeared to evaluate each symbolic link and check for embeded
variables.

I was merely proposing a solution that would only evaluate the link when
it encountered a specific link type (v maybe?)

So we'd have:

# ls -l /
drwxr-xr-x    3 root  wheel    19968 Dec  5  1997 dev/
drwxr-xr-x    2 bin   bin        512 Apr 10 17:53 bin/
vrwxrwxrwx   12 root  wheel       13 Jun  8 13:00 etc$ -> etc.$HOSTNAME
drwxr-xr-x   12 root  wheel     2560 Jun  8 13:00 etc.sasami.jurai.net
drwxr-xr-x   12 root  wheel     2560 Jun  4 12:01 etc.washu.jurai.net
-r-xr-xr-x    1 root  wheel  1124652 Apr 10 17:35 kernel*
drwxr-xr-x    2 bin   bin       1024 Apr 10 18:02 lkm/
drwxr-xr-x    2 bin   bin       1536 Apr 10 17:57 sbin/
drwxrwxrwt    4 root  wheel      512 Jun  8 13:40 tmp/
drwxr-xr-x   19 root  wheel      512 May 13 15:31 usr/
drwxr-xr-x   20 root  wheel      512 Dec  3  1997 var/
lrwxrwxrwx    1 root  wheel       11 Apr 10 17:51 sys@ -> usr/src/sys

This avoids having to escape your variables in such a way as to prevent
collisions as you are assured that use of variables is implied by the 'v'
file type.

If we wished to create a link 'etc -> etc.$HOSTNAME' we would use a normal
symbolic link, not a 'variant link'

I believe this is the way Sprite handles this though I am not sure as my
Sprite cluster is currently down.

/* 
   Matthew N. Dodd		| A memory retaining a love you had for life	
   winter@jurai.net		| As cruel as it seems nothing ever seems to
   http://www.jurai.net/~winter | go right - FLA M 3.1:53	
*/


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980608133507.17992A-100000>