Using symbolic links to simulate direct mounts

Tony Facca fsfacca at zoso.lerc.nasa.gov
Thu Apr 18 23:51:23 AEST 1991


brendan at illyria.wpd.sgi.com (Brendan Eich) writes:
>
>The problem is that /usr/sbin/relnotes, a shell script, uses find(1) to
>search for regular files matching 'ch*.z' under /usr/relnotes, resulting
>in readdir NFS operations, while automount mounts remote filesystems only
>in response to lookup (and readlink for direct maps) NFS operations.
>
>This limitation is discussed in automount(1M)'s NOTES section, in the
>paragraph beginning "An ls(1) listing ....", and applies only to indirect
>maps in the case at hand (if /usr/relnotes were direct-mapped to a remote
>filesystem, find would stat it and follow the automount-emulated symlink,
>causing the remote filesystem to be mounted).
>
>Direct maps are supported in IRIX 4.0.
>
>/be

Brendan--

You are absolutely correct.  I didn't realize that relnotes was a script, 
or I might have figured it out myself.  Anyway, as a quick fix to the 
problem, I simply changed the script to do a chdir and then a find on
the current directory.  This worked just fine. 

If anyone else really cares, here's the diff:

28,29c28,29
< find /usr/relnotes/ -type f -name "ch*.z" -print |  \
<     sed -e 's%/usr/relnotes/%%' -e 's%/ch.\.z%%' | sort -u > $list_relnotes
---
> cd /usr/relnotes; find . -name "ch*.z" -print |  \
>     sed -e 's%./%%' -e 's%/ch.\.z%%' | sort -u > $list_relnotes

Thanks for such a quick response.


-- 
-----------------------------------------------------------------------------
Tony Facca   |   fsfacca at avelon.lerc.nasa.gov      |     phone: 216-433-8318
-----------------------------------------------------------------------------
      You are at Witt's end.  Passages lead off in *all* directions.



More information about the Comp.sys.sgi mailing list