home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / aix / 9370 < prev    next >
Encoding:
Internet Message Format  |  1992-09-03  |  1.8 KB

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