Excerpts from transarc.external.info-afs: 2-Jul-93 getwd() weirdness
Peter [EMAIL PROTECTED] (1940)

> Like most sites, we have our root.cell mounted at
> /afs/pegasus.cranfield.ac.uk and also a short version /afs/pegasus (and
> RW mount points at /afs/.peg*).

> Up to today, whether one cd'ed to a directory via the short or long
> name, subsequent pwds and programs which use getwd() always returned
> the long version. I regarded this as a curiosity, since the two
> pathnames are functionally equivalent. No big deal.

(Nope, I'm not speaking for Customer Support, but...)

It seems wrong to make /afs/pegasus be a mount point.  Far better to
make it a symbolic link to the mount point, which sits at the full cell
name:
        /afs/pegasus -> /afs/pegasus.cranfield.ac.uk

This won't confuse getwd(), which in your setup has an inherent
confusion, since it really has two names for the same mounted file
systems in the /afs/ directory.

It's better to make the full name be the ``real'' name, so that when you
give a path name for others to communicate with, it will be a name that
others can use.  Not everybody will be so lucky as to have /afs/pegasus
be a symlink to your cell name.

> Now we have some braindead software which works out the name of its
> output file by taking the name of the input file, prepending the
> working directory as returned by getwd(), then substituting the output
> file extension after the first dot in the pathname (yes, that's right,
> the first, not the last dot). Every output file ended up as
> /afs/pegasus.out, and the software barfed. Obviously, this problem
> applies to any directory name with a dot in it AFS, NFS or local, but
> only AFS conventionally uses dots.

Indeed, this is a problem, but I'd have to agree that it's braindead
software.  If running this software as-is is vastly important, you may
want to make the long cell name be a symlink to the short one, though
you'll cripple inter-cell pathname transparency.

                Craig
                (speaking for myself, not for Transarc)

Reply via email to