WANTED: real path routine
Larry W. Virden
lwv at n8emr.UUCP
Wed May 31 05:53:46 AEST 1989
I am working with a routine which ATTEMPTS to provide me with the real
machine and pathname of a file when a file is NFS and/or NFS-automounted.
The problem is that I need this code to work in multiple environments.
I had the routine working untill I tried moving it to Ultrix, at which time
it broke due to several unfortunate design decisions - such as the method
for reading the mount table and the use of a subroutine called realpath()
which takes an arbitrary pathname and turns it into a fully resolved pathname
with symbolic link names resolved into hard links (interesting quirk - the
man page says NOTHING about the symbolic link angle - so one doesnt realize
that one is getting that benefit until one goes to replace it on another
more hostile environment)...
Anyways, does anyone out there know of a routine which takes a relative
pathname, possibly containing symbolic links, and which turns it into
a hard link path? Doesnt have to be any particular hardlink path - just
a real one.
As for the purpose in such a routine to de-black box a NFS file -- I recently
noticed some 'heat' concerning folks doing this type of thing. In my case,
I have a number of routines which do some parameter set up locally, then
issue an rsh to a file server to perform some action on the files. The
file server doesnt want to see what MY machine thinks the file is called - it
wants to see what IT thinks the file is called.
--
Larry W. Virden 674 Falls Place, Reynoldsburg, OH 43068 (614) 864-8817
n8emr!lwv at cis.ohio-state.edu (Internet) <-- expiring June 4th, 1989
75046,606 (CIS) ; LVirden (ALPE) ; lwv at cmhgate.fidonet.org <-- New ID!
More information about the Comp.unix.questions
mailing list