From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 6 09:50:56 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG 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 2AF6B16A416 for ; Mon, 6 Nov 2006 09:50:56 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AE9343D66 for ; Mon, 6 Nov 2006 09:50:51 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (dybkve@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id kA69ohKT072243; Mon, 6 Nov 2006 10:50:49 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id kA69ogbY072242; Mon, 6 Nov 2006 10:50:42 +0100 (CET) (envelope-from olli) Date: Mon, 6 Nov 2006 10:50:42 +0100 (CET) Message-Id: <200611060950.kA69ogbY072242@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, bu7cher@yandex.ru In-Reply-To: <454DC4FB.000001.19509@tide.yandex.ru> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Mon, 06 Nov 2006 10:50:49 +0100 (CET) Cc: Subject: Re: Yet another magic symlinks implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, bu7cher@yandex.ru List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Nov 2006 09:50:56 -0000 Andrey V. Elsukov wrote: > > It is interesting to note that DragonFly has had variant symlnks for > > a long time, but we haven't actually found a use for them yet. > > Yes, Matt. Some time ago i've ported Df's variant symlinks too :) > http://butcher.heavennet.ru/patches/kernel/varsym/ > > This task was declared on the ideas page: > http://www.freebsd.org/projects/ideas/#p-magicsymlinks > > But i don't see an interest in this feature among commiters. :( > > > Originally I envisioned using variant symlinks as part of a packaging > > system to allow package environments to be built on the fly, thus > > allowing multiple versions of libraries to coreside and not have the > > 'you have to upgrade everything to install one new thing' problem. > > But that was before we adopted pkgsrc. Pkgsrc doesn't use varsyms, > > so... > > Yes, i think varsyms can be usefull in build enviroments. Somebody spoke that > varsyms can be usable in a cluster or jailed enviroments. FWIW, if FreeBSD had variant symlinks, I would definitely use that feature for jailed environments. Another task: I've written an rc script for my notebook which detects the network environment (home, office, wlan, offline) by pinging some IP addresses. Then it configures several files in /etc for that environment (rc.conf, hosts, ntp.conf, resolv.conf, fstab, etc.). Currently this is done by modifying a bunch of symlimks in /etc each time the notebook is rebooted. I don't like that "solution" at all; in fact I would prefer the root file system to stay read- only. If variant symlinks were available in FreeBSD, the problem could be solved easily. I'm afraid that I don't like NetBSD's "magic symlinks" very much. It's less flexible than variant symlinks because it only supports a fixed set of variables. As far as I can tell, it does not solve any of the tasks described above. Therefore I would really like to see your port of DragonFly BSD's variant symlinks comitted to FreeBSD. Of course, it could be a compile-time option in case there are people who don't want the code in their kernel at all. But you have to set a sysctl anyway to enable it globally (it's disabled by default on DragonFly). Just my 2 cents. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "Documentation is like sex; when it's good, it's very, very good, and when it's bad, it's better than nothing." -- Dick Brandon