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

Revision 24393, 2.8 KB checked in by jdreed, 13 years ago (diff)
In dotfiles: * Make zwgc fallback check case-insensitive (Trac #501)
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 ] || [ "fallback: true" = "`zctl show fallback | tr 'A-Z' 'a-z'`" ]; 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        if hesinfo "$USER" pobox | grep -qv EXCHANGE; then
70            mailquota -n                # Check quota on post office server
71            from.debathena -t -n        # Check for mail
72        fi
73fi
74
75
76# Run the tty-session customizing commands in your ~/.startup.tty file.
77
78if [ -r ~/.startup.tty ]; then
79        # Don't echo if noninteractive
80        if [ "${verbose_login+set}" = set ]; then
81                echo "Running custom startup activities listed in ~/.startup.tty ..."
82        fi
83        . ~/.startup.tty
84fi
85
86
87# Run notification system, lert. To skip this (a generally bad idea unless
88# you plan to run it yourself), put the command "skip_lert=t" in your
89# ~/.bash_environment file.
90
91if [ "${skip_lert+set}" != set ]; then
92        lert -q                         # Don't want to see server errors.
93fi
Note: See TracBrowser for help on using the repository browser.