From owner-freebsd-current Mon Apr 29 09:08:50 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id JAA24904 for current-outgoing; Mon, 29 Apr 1996 09:08:50 -0700 (PDT) Received: from halloran-eldar.lcs.mit.edu (halloran-eldar.lcs.mit.edu [18.26.0.159]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id JAA24897 for ; Mon, 29 Apr 1996 09:08:46 -0700 (PDT) Received: by halloran-eldar.lcs.mit.edu; (5.65/1.1.8.2/19Aug95-0530PM) id AA14531; Mon, 29 Apr 1996 12:08:40 -0400 Date: Mon, 29 Apr 1996 12:08:40 -0400 From: Garrett Wollman Message-Id: <9604291608.AA14531@halloran-eldar.lcs.mit.edu> To: Michael Smith Cc: current@FreeBSD.org Subject: Re: About to make the jump to -current... In-Reply-To: <199604280717.QAA10735@genesis.atrad.adelaide.edu.au> References: <199604280136.TAA02941@rover.village.org> <199604280717.QAA10735@genesis.atrad.adelaide.edu.au> Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk < said: > A question for the wise kernel people - how did the NetBSD folks do their > variant symlink stuff? I was pondering the possibilities of performing > 'magic' translations of symlink destination components based on sysctl > variables. Erk, here's a sample : > Symlink /usr/include to /usr/include.$PERSONALITY$ > sysctl -w symlink.translation.PERSONALITY="current" Better make that `fs.generic.symlink.whatever'... Or perhaps `kern.logical_name.table' (probably make Terry happy). I would use `@variable' rather than anything involving dollar signs, following the example of AFS. Any easy way out of this is to use amd(8). For example, if you were running a diskless NFS client (something I don't recommend), you might do: ln -s /localvar/localvar.'${hostname}' /usr/local/var where /localvar is defined by the map: /defaults: type:=nfs;fs:=${autodir}/${rhost}/root;sublink:=${key} * rhost:=myserver;rfs:=/export/localvar When `amd' processes a request, it automatically translates references to its keywords in the pathname passed to it for lookup, and only then does it look the name up in its map. -GAWollman -- Garrett A. Wollman | Shashish is simple, it's discreet, it's brief. ... wollman@lcs.mit.edu | Shashish is the bonding of hearts in spite of distance. Opinions not those of| It is a bond more powerful than absence. We like people MIT, LCS, ANA, or NSA| who like Shashish. - Claude McKenzie + Florent Vollant