From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,e361b981e2ccfba4 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2003-07-31 15:28:17 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!199.45.49.37!cyclone1.gnilink.net!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!intern1.nntp.aus1.giganews.com!nntp.giganews.com!nntp.aros.net!news.aros.net.POSTED!not-for-mail NNTP-Posting-Date: Thu, 31 Jul 2003 17:28:16 -0500 From: "bofh00" Subject: Re: NIS/NFS automount question Date: Thu, 31 Jul 2003 16:30:10 -0600 User-Agent: Pan/0.13.0 (The whole remains beautiful) Message-ID: Newsgroups: comp.unix.tru64 References: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 NNTP-Posting-Host: 66.219.229.198 X-Trace: sv3-iPfIVoh4gdc0gFGjqBMZLgu0lI2lTvX+9J4+JPlvkTxU5024YFjiM9M0H6d/+lbTWkgxlJDXdtO//u3!qjctUvg4IIMrHVOfS51SX0icEZym4M+Lqf3XNRDU+gpOVgHcw+5IA6W/JS5W5yEpi9pUd21bJyRz!hqtHEqJwZDAhMgLZTg== X-Complaints-To: abuse@aros.net X-DMCA-Complaints-To: abuse@aros.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: archiver1.google.com comp.unix.tru64:10454 On Mon, 21 Jul 2003 10:05:14 +0000, Aaron J. Greenwood wrote: > If I cd into /lin/data/aug2001 on a system running Linux or Irix pwd returns > /lin/data/aug2001 > > If I cd into /lin/data/aug2001 on a system running Tru64 pwd returns > /tmp_mnt/lin/data/aug2001. This creates problems with scripts that use pwd. > > Is there a way to get pwd to drop the /tmp_mnt part of the path? > > I am running NIS, NFS and automount. For this file system the following is > true: > > auto.master has the following line: > /lin auto.lin -rw,intr > > auto.lin has the following line: > data hostname.subdomain.uci.edu:/data > > On the Tru64 systems I am using automount > On the Irix systems I am using autofs or automount > On the Linux systems I am using autofs > > Any help would be appreciated. Or just modify your scripts. Use "uname" to check the os type and based on it or perhaps just look for tmp_mnt in path. In either case you could something like the following in the scripts. FOO=`pwd 2>/dev/null | sed "s/.*\/tmp_mnt//g"` That should strip the /tmp_mnt off and dump the rest in FOO. I think. Didnt try it. Test it if you plan to use.