From owner-freebsd-current Mon Jun 8 10:49:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA01839 for freebsd-current-outgoing; Mon, 8 Jun 1998 10:49:35 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from sasami.jurai.net (winter@sasami.jurai.net [207.153.65.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA01823 for ; Mon, 8 Jun 1998 10:49:27 -0700 (PDT) (envelope-from winter@jurai.net) Received: from localhost (winter@localhost) by sasami.jurai.net (8.8.8/8.8.7) with SMTP id NAA11388; Mon, 8 Jun 1998 13:49:06 -0400 (EDT) Date: Mon, 8 Jun 1998 13:49:06 -0400 (EDT) From: "Matthew N. Dodd" To: wjw@IAEhv.nl cc: mike@smith.net.au, current@FreeBSD.ORG Subject: Re: Variant Link implementation (Was: Re: lorder problem: ....... ) In-Reply-To: <199806081606.SAA29892@surf.IAEhv.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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