source: trunk/debathena/debathena/dotfiles/env_setup @ 22913

Revision 22913, 1.4 KB checked in by tabbott, 16 years ago (diff)
In dotfiles: * Merge in quilt patches. These and other changes are summarized below. * Remove platform-specific code for non-Linux architectures. * Remove mksessiondirs and other ATHENA_SESSION_TMPDIr code; this is now handled by pam_mktemp * Run from.debathena and quota.debathena rather than from/quota in case debathena-from-config/debathena-quota-config are not installed * Remove unecessary athena/ from paths, except in prototype files which should remain unchanged for compatability. * Remove ancient extend alias from tcsh dotfiles. * Set ZEPHYR_CLIENT to not run zwgc on dialups; this avoids problems with zephyr in Debian automatically gaining focus. * Remove code for handling temporary home directories, since those can't happen anymore. * Stop setting XDG_DATA_DIRS; this is now controlled by debathena-desktop-config. * Stop setting COREDUMPSIZE; this was an IRIX workaround * Stop setting LD_LIBRARY_PATH to /usr/athena/lib; this breaks building things when /usr/athena is a symlink. * Stop setting XUSERFILESEARCHPATH to a directory that doesn't exist. * Change renew alias to use 'kinit -54' so we no longer require modified Kerberos. * Stop setting MANPATH, since we'd be setting it to the default anyway. * Remove athena_path logic, since athena_path would be PATH. * Only have one copy of the add alias, now that athena_path is gone. * Remove add_flags since it is always empty. * Don't temporarily remove add in cshrc. * Stop setting CDPATH. * Stop changing the default prompt for bash; the Debian default is better. * Stop changing the default prompt for tcsh, but leave the prompt character change, since there's a lot of documentation that uses it. * Stop configuring tcsh to not stat /afs/* when tab-completing; fakestat handles this. * Remove tcsh warning for "bind" alias.
Line 
1# Prototype file for setting up course-specific environment
2# $Id: env_setup,v 1.6 1999-02-04 17:49:00 ghudson Exp $
3
4# Just in case this alias is not already set,
5alias extend 'if (-d \!:2) if ("$\!:1" \!~ *"\!:2"*) set extendyes && \\
6        if ($?extendyes && $?verboseadd) echo \!:2 added to end of \$\!:1 && \\
7        if ($?extendyes) setenv \!:1 ${\!:1}:\!:2 && \\
8        unset extendyes'
9
10echo "Attaching $SUBJECT ... "
11set setup_dir = `/bin/attach -p $SUBJECT`
12
13if (! $status) then
14
15        # Record information to remove setup later
16        set setup_filsys = $SUBJECT
17
18        # Set prompt to reflect changed environment
19        set prompt = "$SUBJECT% "
20
21        if ( -r $setup_dir/.attachrc) then
22                unsetenv SUBJECT        # to prevent infinite loops
23                echo "Running commands in $setup_dir/.attachrc ... "
24                source $setup_dir/.attachrc
25        else
26                # Do minimal environment setup
27                extend PATH $setup_dir/${bindir}
28                extend MANPATH $setup_dir/man
29        endif 
30else
31        echo ""
32        echo "The $SUBJECT filesystem could not be attached."
33        set filsys = `hesinfo $SUBJECT filsys`
34        if ($#filsys < 3) then
35                echo "Check your spelling of the filesystem name."
36        else
37                echo -n "The $filsys[1] fileserver"
38                if ($filsys[1] != AFS) echo -n " named $filsys[3]"
39                echo " may be down."
40        endif
41        if ($?XSESSION) then
42                echo "Type exit to get rid of this window."
43        else
44                kill -HUP $$    # cause shell to exit
45        endif
46endif
47unsetenv SUBJECT        # to prevent infinite loops
Note: See TracBrowser for help on using the repository browser.