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.
RevLine 
[13196]1# Prototype global .bash_login file
[22666]2# $Id: bash_login,v 1.12 2007-08-22 18:11:08 ghudson Exp $
[13196]3
4# This file is sourced by default user file ~/.bash_login
5
[21128]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.
[13196]9. ~/.bashrc
10
[22913]11initdir=/usr/lib/init
[13196]12
[17541]13# Remember the pid of the login shell; used by dustbuster.
14ATHENA_LOGIN_SESSION=$$
15export ATHENA_LOGIN_SESSION
16
[13196]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
[17753]34case $TERM in
[13196]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
[13242]41        if [ "${DEF_TERM+set}" != set ]; then DEF_TERM=vt100; fi
[13480]42        set -f; eval `tset -s -I -Q "?${DEF_TERM}"`; set +f
[13196]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
[21128]52# "skip_tty_startup=t" in your ~/.bash_environment file.
[13196]53
[13242]54if [ "${ZEPHYR_CLIENT+set}" != set ]; then
[13196]55        export ZEPHYR_CLIENT
[22913]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
[13196]61fi
62
[13242]63if [ "${skip_tty_startup+set}" != set ]; then
[13480]64        if [ "${verbose_login+set}" = set ]; then
[13196]65                 echo "Running standard startup activities ..."
66        fi
67        $ZEPHYR_CLIENT                  # Start Zephyr client
[21128]68        get_message -new -login         # Display current motd
[19883]69        mailquota -n                    # Check quota on post office server
[22913]70        from.debathena -t -n            # Check for mail
[13242]71fi
[13196]72
73
74# Run the tty-session customizing commands in your ~/.startup.tty file.
75
76if [ -r ~/.startup.tty ]; then
[13242]77        # Don't echo if noninteractive
[13480]78        if [ "${verbose_login+set}" = set ]; then
[13196]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
[21128]86# you plan to run it yourself), put the command "skip_lert=t" in your
[13196]87# ~/.bash_environment file.
88
[13242]89if [ "${skip_lert+set}" != set ]; then
[13196]90        lert -q                         # Don't want to see server errors.
91fi
Note: See TracBrowser for help on using the repository browser.