Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 07 Jun 2002 09:59:08 -0500
From:      C Peter Biessener <pbiessener@hirshfields.com>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   amd link behavior
Message-ID:  <3D00CA3C.7050106@hirshfields.com>

next in thread | raw e-mail | index | archive | help
How do I get amd created links to behave the same way as user created 
links?  Please read the example below.



If I create a link to a directory myself, when I cd to the link and then 
ask what my pwd is, the answer shows I am in the 'link' for a directory:

# pwd
/home/peter
# ln -s template/util util
# ls -l
. . .
lrwxrwxrwx   1 root  wheel   25 Jun  6 16:46 util -> 
/home/peter/template/util
. . .
# cd util
# pwd
/home/peter/util



However, if I set up amd to automount a filesystem, the behavior is 
different.  amd does create a link, but when you cd there, and ask for 
the pwd, it reports the 'internal' mount directory.

# amd -r -l syslog /net /etc/net.map
# cat /etc/net.map
history type:=nfs;rhost:=server;rfs:=/data/history;sublink:={host.}
# cd /net
# ls -l
lrwxrwxrwx   1 root  wheel   29 Jun  6 16:49 history -> 
/a/server/data/history/host_a
# cd history
# pwd
/a/server/data/history/host_a

The behavior I would like to see is if the amd created links behaved the 
same way as a user created link.  In the above example, when I cd'd to 
history, I would like pwd to report my directory as '/net/history'.  My 
reasoning is:  from the amd internal mount point, I can cd ../host_b and 
mess with the files belonging to host_b.  That behavior is MOST undesirable.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D00CA3C.7050106>