Revision 24895,
910 bytes
checked in by jdreed, 14 years ago
(diff) |
In shell-config:
* Make renew work for cells other than athena.mit.edu
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | # Global bashrc file for Debathena machines |
---|
3 | |
---|
4 | export HOSTTYPE="`/bin/machtype`" |
---|
5 | export ATHENA_SYS=`/bin/machtype -S` |
---|
6 | export ATHENA_SYS_COMPAT=`/bin/machtype -C` |
---|
7 | if [ -z "$ATHENA_SYS" ]; then |
---|
8 | export ATHENA_SYS=@sys |
---|
9 | fi |
---|
10 | |
---|
11 | renew () { |
---|
12 | principal=`klist -5 2>/dev/null | sed -n 's/^Default principal: // p'` |
---|
13 | KINIT_ARGS="" |
---|
14 | kinit -4 </dev/null &>/dev/null |
---|
15 | [ $? != 3 ] && KINIT_ARGS="-54" |
---|
16 | kinit $KINIT_ARGS "${principal:-$ATHENA_USER}" || return $? |
---|
17 | DEBATHENA_AKLOG="aklog -c athena.mit.edu -p $HOME" |
---|
18 | [ -x /bin/fsid ] && DEBATHENA_AKLOG="fsid -a" |
---|
19 | [ -e /afs/athena.mit.edu ] && $DEBATHENA_AKLOG || { |
---|
20 | ret=$? |
---|
21 | echo >&2 |
---|
22 | echo "Your AFS client does not seem to be working. To troubleshoot this problem," >&2 |
---|
23 | echo "visit http://debathena.mit.edu/troubleshooting#openafs-modules" >&2 |
---|
24 | return $ret |
---|
25 | } |
---|
26 | } |
---|
27 | |
---|
28 | add_flags= |
---|
29 | add () { eval "$( /bin/attach -Padd -b $add_flags "$@" )" ; } |
---|
Note: See
TracBrowser
for help on using the repository browser.