home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!ut-emx!ibmchs!auschs!awdprime.austin.ibm.com!codesmith.austin.ibm.com!dcm
- From: dcm@codesmith.austin.ibm.com (Craig Miller)
- Newsgroups: comp.unix.aix
- Subject: Re: automounter strangeness..
- Message-ID: <1992Sep3.192741.19731@awdprime.austin.ibm.com>
- Date: 3 Sep 92 19:27:41 GMT
- References: <261@sabus.UUCP>
- Sender: news@awdprime.austin.ibm.com (USENET News)
- Distribution: comp
- Organization: IBM AWD, Austin
- Lines: 33
-
- In article <261@sabus.UUCP> tim@sabus.UUCP (Tim Brown) writes:
- >Maybe someone can help with this. When I do a 'pwd' from a ksh I get
- >the aliased path of an automounted fs. When I run /bin/pwd or from sh
- >or csh I get the /tmp/mnt_* path. Question: How can I get the aliased
- >path all the time without having to rely on the ksh's builtin pwd.
- >The ksh's pwd returns the non-aliased path when run from another host.
- >
- >Any ideas? getcwd() and getwd() both return the non-aliased path as
- >well.
-
- /bin/pwd, getcwd() and getwd() all work by walking back up
- the path from your actual current working directory.
-
- Ksh's builtin 'pwd' works by echoing $PWD. $PWD is set to
- your home directory (according to /etc/passwd) when you login.
- Ksh also tries to maintain $PWD to handle cd'ing into symlinks, etc.
-
- The automounter works by making the automounted target directory
- a symbolic link to /tmp/mnt_*, then it does the actual mount
- over /tmp/mnt_*.
-
- So, when you login, your actual cwd *is* /tmp/mnt_*, which
- explains why /bin/pwd, et al all report it. They're right.
-
- Ksh is trying to give you a pwd that reflects symlinks.
- /bin/pwd can't do that.
-
- >Tim Brown
- >The SABUS Group
- --
- Craig Miller, software mechanic - AIXV3 Change Team (Level3 support)
- dcm%codesmith.austin.ibm.com@ibmpa.awdpa.ibm.com
- "I do not represent IBM. They wouldn't let me."
-