summaryrefslogtreecommitdiffstats
path: root/config/nfspwd.pl
diff options
context:
space:
mode:
Diffstat (limited to 'config/nfspwd.pl')
-rw-r--r--config/nfspwd.pl21
1 files changed, 21 insertions, 0 deletions
diff --git a/config/nfspwd.pl b/config/nfspwd.pl
new file mode 100644
index 00000000..a4d1645d
--- /dev/null
+++ b/config/nfspwd.pl
@@ -0,0 +1,21 @@
+#! /usr/local/bin/perl
+#
+# BEGIN COPYRIGHT BLOCK
+# Copyright 2001 Sun Microsystems, Inc.
+# Portions copyright 1999, 2001-2003 Netscape Communications Corporation.
+# All rights reserved.
+# END COPYRIGHT BLOCK
+#
+
+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");
+}