source: trunk/debathena/debathena/dotfiles/login @ 24101

Revision 24101, 2.6 KB checked in by rbasch, 15 years ago (diff)
In dotfiles: * Fix the test of from's availability.
  • Property svn:executable set to *
Line 
1# Prototype global .login file
2# $Id: login,v 1.15 2007-08-22 18:11:08 ghudson Exp $
3
4# This file is sourced by default user file ~/.login
5
6# Remember the pid of the login shell; used by dustbuster.
7setenv ATHENA_LOGIN_SESSION $$
8
9set initdir=/usr/lib/init
10
11if (! -r ~/.hushlogin) then
12        set verbose_login       # Echo messages unless user has ~/.hushlogin.
13endif
14/bin/stty sane                  # Use sane control characters
15
16# *******************   ENVIRONMENT SETUP   *******************
17
18# The ~/.cshrc file sets environment variables, attaches lockers, and sets
19# the command search path.  It has already been sourced at this point.
20
21
22# *******************   DEVICE SETUP   *******************
23
24# Set device type if interactive session (e.g., dialup)
25
26if (("$term" == switch) || ("$term" == network) || ("$term" == dialup) \
27    || ("$term" == unknown)) then
28
29    # The standard terminal emulation is vt100.  To use a different emulation,
30    # set the environmental variable DEF_TERM in your ~/.environment file to
31    # to the device you want to emulate (one that the system will recognize).
32
33    if (! $?DEF_TERM) setenv DEF_TERM vt100
34    set noglob; eval `tset -s -I -Q "?${DEF_TERM}"` || unset noglob
35
36endif
37
38
39# *******************   ACTIVITY STARTUP   *******************
40
41# Run standard system/user startup activities
42
43# Run default system startup activities.  To skip these, put the command
44# "set skip_tty_startup" in your ~/.environment file.
45
46if (! $?ZEPHYR_CLIENT) then
47        if (! -f /etc/athena/dialuptype || "fallback: true" == "`zctl show fallback`") then
48                setenv ZEPHYR_CLIENT zwgc
49        else
50                setenv ZEPHYR_CLIENT 'echo This is a dialup, so zwgc is not being run on login.'
51        endif
52endif
53
54if (! $?skip_tty_startup) then
55        if ($?verbose_login) echo "Running standard startup activities ..."
56        set ignoreeof                   # ^D won't log you out
57        $ZEPHYR_CLIENT                  # Start Zephyr client
58        get_message -new -login         # Display current motd
59        if ("`hesinfo $USER pobox`" !~ "*EXCHANGE*") then
60          if { (which from.debathena >& /dev/null) } then
61            mailquota -n                # Check quota on post office server
62            from.debathena -t -n        # Check for mail
63          endif
64        endif
65endif
66
67
68# Run the tty-session customizing commands in your ~/.startup.tty file.
69
70if (-r ~/.startup.tty) then
71        if ($?verbose_login) then               # Don't echo if noninteractive
72          echo "Running custom startup activities listed in ~/.startup.tty ..."
73        endif
74        source ~/.startup.tty
75endif
76
77
78# Run notification system, lert. To skip this (a generally bad idea unless
79# you plan to run it yourself), put the command "set skip_lert" in your
80# ~/.environment file.
81
82if (! $?skip_lert) then
83        lert -q                         # Don't want to see server errors.
84endif
Note: See TracBrowser for help on using the repository browser.