source: trunk/debathena/config/alpine-config/debian/alpine.debathena @ 24295

Revision 24295, 818 bytes checked in by geofft, 14 years ago (diff)
In alpine-config: * Don't rewrite ~/.pinerc with sed if we're going to end up not changing it.
  • Property svn:executable set to *
Line 
1#!/bin/bash
2
3arg=()
4case "$(hesinfo "${ATHENA_USER:-$USER}" pobox 2>/dev/null | cut -d' ' -f2)" in
5    *EXCHANGE*) arg=(-disable-these-authenticators=GSSAPI) ;;
6esac
7
8if ! klist -s; then
9    arg=(-disable-these-authenticators=GSSAPI)
10fi
11
12: ${ATHENA_USER=$USER}
13export ATHENA_USER
14
15# If you've customized your folder collections on an Athenified pine,
16# then you probably have copied in mit.edu/hesiod/imap, which isn't
17# going to work.
18#
19# We substitute in $ATHENA_USER rather than use the variable because
20# Athena 9 doesn't have it, and besides this is presumably not being
21# shared between users.
22if [ -e ~/.pinerc ] && grep -qF mit.edu/hesiod/imap ~/.pinerc; then
23    sed -i "s#mit\.edu/hesiod/imap#$ATHENA_USER\.mail\.mit\.edu/imap/user=$ATHENA_USER#g" ~/.pinerc
24fi
25
26exec "alpine.debathena-orig" "${arg[@]}" "$@"
Note: See TracBrowser for help on using the repository browser.