source: trunk/debathena/debathena/dotfiles/bash_login @ 23030

Revision 23030, 2.7 KB checked in by ghudson, 16 years ago (diff)
In dotfiles: * Restore the cdpath and prompt customizations for tcsh. * Eliminate the noclobber and ignoreeof customizations for bash. * Add /sbin and /usr/sbin to the path for both shell types.
Line 
1# Prototype global .bash_login file
2# $Id: bash_login,v 1.12 2007-08-22 18:11:08 ghudson Exp $
3
4# This file is sourced by default user file ~/.bash_login
5
6# Unlike tcsh, bash does not source .bashrc in a login shell.  Since
7# we rely on the environment setup performed by bashrc, source it
8# explicitly.
9. ~/.bashrc
10
11initdir=/usr/lib/init
12
13# Remember the pid of the login shell; used by dustbuster.
14ATHENA_LOGIN_SESSION=$$
15export ATHENA_LOGIN_SESSION
16
17if [ ! -r ~/.hushlogin ]; then
18        verbose_login=t         # Echo messages unless user has ~/.hushlogin.
19fi
20
21/bin/stty sane                  # Use sane control characters
22
23# *******************   ENVIRONMENT SETUP   *******************
24
25# The ~/.bashrc file sets environment variables, attaches lockers, and sets
26# the command search path.  It has already been sourced at this point.
27
28# Check that user home directory is available
29
30# *******************   DEVICE SETUP   *******************
31
32# Set device type if interactive session (e.g., dialup)
33
34case $TERM in
35switch|network|dialup|unknown)
36        # The standard terminal emulation is vt100.  To use a different
37        # emulation, set the environmental variable DEF_TERM in your
38        # ~/.bash_environment file to to the device you want to emulate
39        # (one that the system will recognize).
40        export DEF_TERM
41        if [ "${DEF_TERM+set}" != set ]; then DEF_TERM=vt100; fi
42        set -f; eval `tset -s -I -Q "?${DEF_TERM}"`; set +f
43        ;;
44esac
45
46
47# *******************   ACTIVITY STARTUP   *******************
48
49# Run standard system/user startup activities
50
51# Run default system startup activities.  To skip these, put the command
52# "skip_tty_startup=t" in your ~/.bash_environment file.
53
54if [ "${ZEPHYR_CLIENT+set}" != set ]; then
55        export ZEPHYR_CLIENT
56        if [ ! -f /etc/athena/dialuptype ]; then
57                ZEPHYR_CLIENT=zwgc
58        else
59                ZEPHYR_CLIENT='echo This is a dialup, so zwgc is not being run on login.'
60        fi
61fi
62
63if [ "${skip_tty_startup+set}" != set ]; then
64        if [ "${verbose_login+set}" = set ]; then
65                 echo "Running standard startup activities ..."
66        fi
67        $ZEPHYR_CLIENT                  # Start Zephyr client
68        get_message -new -login         # Display current motd
69        mailquota -n                    # Check quota on post office server
70        from.debathena -t -n            # Check for mail
71fi
72
73
74# Run the tty-session customizing commands in your ~/.startup.tty file.
75
76if [ -r ~/.startup.tty ]; then
77        # Don't echo if noninteractive
78        if [ "${verbose_login+set}" = set ]; then
79                echo "Running custom startup activities listed in ~/.startup.tty ..."
80        fi
81        . ~/.startup.tty
82fi
83
84
85# Run notification system, lert. To skip this (a generally bad idea unless
86# you plan to run it yourself), put the command "skip_lert=t" in your
87# ~/.bash_environment file.
88
89if [ "${skip_lert+set}" != set ]; then
90        lert -q                         # Don't want to see server errors.
91fi
Note: See TracBrowser for help on using the repository browser.