Debian Codegraph @

contrib/netpwd

raw symbols SCIP
1 #! /bin/sh
2 # Copyright 2002 Free Software Foundation
3 # by Alexandre Oliva <[email protected]>
4
5 # This script is Free Software, and it can be copied, distributed and
6 # modified as defined in the GNU General Public License. A copy of
7 # its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
8
9 # Turn a local pathname into a network-neutral one. It assumes
10 # /net/$HOSTNAME/pathname can access $HOSTNAME's /pathname from other
11 # machines, and that /net/$HOSTNAME is actually mounted (by amd)
12 # inside /.automount/$HOSTNAME/root, so it compensates for that.
13
14 dir=`${REAL_PWD-pwd}`
15 case $dir in
16 /net/*)
17 ;;
18 /.automount/*/root/*)
19 dir=/net/`echo "$dir" | sed -e '1s,^/\.automount/,,' -e 's,/root/,/,'`
20 ;;
21 *)
22 dir=/net/${HOSTNAME-`uname -n`}$dir
23 ;;
24 esac
25 echo $dir
26 exit 0