Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Nov 2006 02:11:54 +0100
From:      Pawel Worach <pawel.worach@gmail.com>
To:        Mike Meyer <mwm-keyword-freebsdhackers2.e313df@mired.org>
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
Message-ID:  <454E8BDA.9030304@gmail.com>
In-Reply-To: <17741.9196.102826.208010@bhuda.mired.org>
References:  <454C55BD.000003.22283@webmail11.yandex.ru> <17741.9196.102826.208010@bhuda.mired.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?454E8BDA.9030304>