config/nfspwd.pl
author wtc%netscape.com
Thu, 13 Aug 1998 00:08:38 +0000
branchAUTOCONF_1_0
changeset 211 11f9f9b5f78fe8a737e8ab3c8e07335e2db80059
parent 0 a4b34919bf34db2ee22acbbc305693c8980b6dc6
child 564 105df5f4367d6d1226436b9ef164913ff8a644db
permissions -rw-r--r--
Use $< so that VPATH works. (AUTOCONF_1_0 branch)

#! perl
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL.  You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
# 
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
# 
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation.  Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
# Reserved.
#

require "fastcwd.pl";

$_ = &fastcwd;
if (m@^/[uh]/@o || s@^/tmp_mnt/@/@o) {
    print("$_\n");
} elsif ((($user, $rest) = m@^/usr/people/(\w+)/(.*)@o)
      && readlink("/u/$user") eq "/usr/people/$user") {
    print("/u/$user/$rest\n");
} else {
    chop($host = `hostname`);
    print("/h/$host$_\n");
}