From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 6 01:12:00 2006 Return-Path: <owner-freebsd-hackers@FreeBSD.ORG> 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 49ECF16A49E for <freebsd-hackers@freebsd.org>; Mon, 6 Nov 2006 01:12:00 +0000 (UTC) (envelope-from pawel.worach@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.FreeBSD.org (Postfix) with ESMTP id C1DB143D55 for <freebsd-hackers@freebsd.org>; Mon, 6 Nov 2006 01:11:58 +0000 (GMT) (envelope-from pawel.worach@gmail.com) Received: by ug-out-1314.google.com with SMTP id o2so657560uge for <freebsd-hackers@freebsd.org>; Sun, 05 Nov 2006 17:11:57 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=ukx9LuIUBpW7COWtiFuI9koRWLFAZTFtSYKu406M+NkiR5bU1lz1vLRLIEj9IE1ZjnuPtqqu/g3wcR6iZGZtvUiDfY0LdYz1W30SPSqZppFf5if59mNlcS7GpEt23KA+WCw9z6/iWmJ3k8LmrHRJj2QisHy+WEKNaJnGcFUWDiQ= Received: by 10.67.30.6 with SMTP id h6mr6530048ugj.1162775516977; Sun, 05 Nov 2006 17:11:56 -0800 (PST) Received: from ?192.168.1.200? ( [80.217.194.157]) by mx.google.com with ESMTP id o24sm4319237ugd.2006.11.05.17.11.56; Sun, 05 Nov 2006 17:11:56 -0800 (PST) Message-ID: <454E8BDA.9030304@gmail.com> Date: Mon, 06 Nov 2006 02:11:54 +0100 From: Pawel Worach <pawel.worach@gmail.com> User-Agent: Thunderbird 1.5.0.7 (X11/20061105) MIME-Version: 1.0 To: Mike Meyer <mwm-keyword-freebsdhackers2.e313df@mired.org> References: <454C55BD.000003.22283@webmail11.yandex.ru> <17741.9196.102826.208010@bhuda.mired.org> In-Reply-To: <17741.9196.102826.208010@bhuda.mired.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 06 Nov 2006 20:09:03 +0000 Cc: freebsd-hackers@freebsd.org, xdivac02@stud.fit.vutbr.cz, bu7cher@yandex.ru, jwd@FreeBSD.org, joel@FreeBSD.org Subject: Re: Yet another magic symlinks implementation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD <freebsd-hackers.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers> List-Post: <mailto:freebsd-hackers@freebsd.org> List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 06 Nov 2006 01:12:00 -0000 Mike Meyer wrote: > In <454C55BD.000003.22283@webmail11.yandex.ru>, Andrey V. Elsukov <bu7cher@yandex.ru> typed: >> Hi, All! >> >> I've ported NetBSD magic symlinks implementation to FreeBSD. >> The description of magiclinks can been found here: >> http://www.daemon-systems.org/man/symlink.7.html > > This kind of thing has been showing up in Unix variants for a couple > of decades, but none have have ever caught on. Can you provide some > examples of what this is being used for? > An interesting use for this is found in an commercial embedded platform where a system image is selected with a @sys variable symlink. This is used for live upgrades (and fast backouts or test boots) of the platform where a new image is extracted from a .tgz to /image/$new_version and the @sys variable is likely updated by the boot loader for the next boot. # ls -l /usr lrwxr-xr-x 1 root wheel 8 Oct 3 13:32 /usr -> @sys/usr # cd /usr # pwd /image/OS-VERSION-BUILD-ID/usr Here a sysctl/kenv variable defines the @sys link target kern:@sys = image/OS-VERSION-BUILD-ID Regards -- Pawel