From owner-freebsd-hackers Wed Mar 12 16:39:56 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7A1E537B401 for ; Wed, 12 Mar 2003 16:39:55 -0800 (PST) Received: from bsdone.bsdwins.com (www.bsdwins.com [192.58.184.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3790143F93 for ; Wed, 12 Mar 2003 16:39:54 -0800 (PST) (envelope-from jwd@bsdwins.com) Received: from bsdone.bsdwins.com (localhost [127.0.0.1]) by bsdone.bsdwins.com (8.12.5/8.12.5) with ESMTP id h2D0drW2001961 for ; Wed, 12 Mar 2003 19:39:53 -0500 (EST) (envelope-from jwd@www.bsdwins.com) Received: (from jwd@localhost) by bsdone.bsdwins.com (8.12.5/8.12.5/Submit) id h2D0dq82001960 for freebsd-hackers@freebsd.org; Wed, 12 Mar 2003 19:39:52 -0500 (EST) Date: Wed, 12 Mar 2003 19:39:52 -0500 From: John To: Hackers List Subject: magic symbolic links (ideas/patches?) Message-ID: <20030313003952.GA1800@BSDWins.Com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi Folks, I have a need to implement a highly specific variant usage of what are commonly referred to as magic symlinks, ie: /src -> /.src/$ARCH/src where $ARCH needs to come from the user environment. A related patchset from NetBSD (1995) can be seen here: http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=1781 In my specific implementation, the value of $ARCH will ALWAYS be 3 characters (Not having implemented anything yet, and to avoid possibly playing the userland game, I was thinking of adding a field to the proc structure and having the setenv/putenv functions place the value there via a sysctl, thus allowing a very simple interface... short sighted?). If anyone has any comments, or patches hanging around for this type of implementation, I would appreciate a pointer to them. Many, Many Thanks, John To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message