lkml.org 
[lkml]   [1997]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Conditional SymLinks
Stefan Monnier
<monnier+lists/linux/kernel/news/@TEQUILA.SYSTEMSZ.CS.YALE.EDU> writes:

That's an interesting e-mail address you got there.

> Tall cool one <ice@mama.indstate.edu> writes:
> > - One must expand sym link lookups always, not just when they are
> > followed, otherwise your shell or programs might (will) get confused
> > when they read the link themselves and try to use it.
>
> AFS does it differently: the expension of "@sys" is not in any way bound to
> symlinks, so the symlink points to "@sys" and the directory "@sys"
> indeed exists so tools don't get confused.

That's just exchanging conditional sym-links for special FS constructs.
Along the same vein though, one way to perhaps do conditional type links
would be through a special /proc like filesystem, a "/cond" filesystem where
it had special files and directories like "home", "shell", "username",
"hostname", etc, which would be symlinks to the appropriate home dir, shell
or whatever. Like:

/tmp -> /cond/home/tmp

/cond/home -> /u/bubba

thus resulting in /u/bubba/tmp

This has the advantage that only those links that need "expansion" go
through the /cond filesystem and get dealt with. Also the /cond FS might be
better suited to integration with any userlevel daemons and still have
access to kernel structures. It would also allow programs that are aware of
the /cond FS an easy way to talk to it and change it's behaviour.

This also has the advantage that all FS's with sym-links are automatically
able to use it and the functionality can be completely isolated to one
module. Much cleaner. I think even Linus would approve. =)

This is, I beleive, the way to do it.

- Steve

.------------------------------------------------. # * # # # # # #
| Steve Baker | Barely Working | # ## # # # # #
| ice@mama.indstate.edu | System Administrator | # # # # # # # #
| Red-Hat Rulz! | Will work for hardware | # # # ## # # # #
`-- SYS-ADMIN FOR HIRE, HAVE UNIX, WILL TRAVEL --' #### # # # ## # #

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.041 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site