Rev | Line | |
---|
[22685] | 1 | #!/bin/bash |
---|
[22697] | 2 | # Global bashrc file for Debathena machines |
---|
[22685] | 3 | |
---|
[22697] | 4 | export HOSTTYPE="`/bin/machtype`" |
---|
| 5 | export ATHENA_SYS=`/bin/machtype -S` |
---|
| 6 | export ATHENA_SYS_COMPAT=`/bin/machtype -C` |
---|
[22685] | 7 | if [ -z "$ATHENA_SYS" ]; then |
---|
| 8 | export ATHENA_SYS=@sys |
---|
| 9 | fi |
---|
| 10 | |
---|
[22705] | 11 | renew () { |
---|
| 12 | principal=`klist -5 2>/dev/null | sed -n 's/^Default principal: // p'` |
---|
[24097] | 13 | KINIT_ARGS="" |
---|
| 14 | kinit -4 </dev/null &>/dev/null |
---|
| 15 | [ $? != 3 ] && KINIT_ARGS="-54" |
---|
| 16 | kinit $KINIT_ARGS "${principal:-$ATHENA_USER}" || return $? |
---|
[24970] | 17 | [ -e /afs/athena.mit.edu ] && { |
---|
| 18 | if [ "$DEBATHENA_HOME_TYPE" = afs ]; then |
---|
| 19 | if [ -x /bin/fsid ]; then |
---|
| 20 | fsid -a |
---|
| 21 | else |
---|
| 22 | aklog -p "$HOME" |
---|
| 23 | fi |
---|
| 24 | fi |
---|
| 25 | } && aklog || { |
---|
[23212] | 26 | ret=$? |
---|
| 27 | echo >&2 |
---|
| 28 | echo "Your AFS client does not seem to be working. To troubleshoot this problem," >&2 |
---|
| 29 | echo "visit http://debathena.mit.edu/troubleshooting#openafs-modules" >&2 |
---|
| 30 | return $ret |
---|
| 31 | } |
---|
[22705] | 32 | } |
---|
[22685] | 33 | |
---|
| 34 | add_flags= |
---|
[22697] | 35 | add () { eval "$( /bin/attach -Padd -b $add_flags "$@" )" ; } |
---|
Note: See
TracBrowser
for help on using the repository browser.