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. |
---|
7 | setenv ATHENA_LOGIN_SESSION $$ |
---|
8 | |
---|
9 | set initdir=/usr/lib/init |
---|
10 | |
---|
11 | if (! -r ~/.hushlogin) then |
---|
12 | set verbose_login # Echo messages unless user has ~/.hushlogin. |
---|
13 | endif |
---|
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 | |
---|
26 | if (("$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 | |
---|
36 | endif |
---|
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 | |
---|
46 | if (! $?ZEPHYR_CLIENT) then |
---|
47 | if (! -f /etc/athena/dialuptype) 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 |
---|
52 | endif |
---|
53 | |
---|
54 | if (! $?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 | mailquota -n # Check quota on post office server |
---|
60 | from.debathena -t -n # Check for mail |
---|
61 | endif |
---|
62 | |
---|
63 | |
---|
64 | # Run the tty-session customizing commands in your ~/.startup.tty file. |
---|
65 | |
---|
66 | if (-r ~/.startup.tty) then |
---|
67 | if ($?verbose_login) then # Don't echo if noninteractive |
---|
68 | echo "Running custom startup activities listed in ~/.startup.tty ..." |
---|
69 | endif |
---|
70 | source ~/.startup.tty |
---|
71 | endif |
---|
72 | |
---|
73 | |
---|
74 | # Run notification system, lert. To skip this (a generally bad idea unless |
---|
75 | # you plan to run it yourself), put the command "set skip_lert" in your |
---|
76 | # ~/.environment file. |
---|
77 | |
---|
78 | if (! $?skip_lert) then |
---|
79 | lert -q # Don't want to see server errors. |
---|
80 | endif |
---|