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 || "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 |
---|
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 | if ("`hesinfo $USER pobox`" !~ "*EXCHANGE*") then |
---|
60 | mailquota -n # Check quota on post office server |
---|
61 | from.debathena -t -n # Check for mail |
---|
62 | endif |
---|
63 | endif |
---|
64 | |
---|
65 | |
---|
66 | # Run the tty-session customizing commands in your ~/.startup.tty file. |
---|
67 | |
---|
68 | if (-r ~/.startup.tty) then |
---|
69 | if ($?verbose_login) then # Don't echo if noninteractive |
---|
70 | echo "Running custom startup activities listed in ~/.startup.tty ..." |
---|
71 | endif |
---|
72 | source ~/.startup.tty |
---|
73 | endif |
---|
74 | |
---|
75 | |
---|
76 | # Run notification system, lert. To skip this (a generally bad idea unless |
---|
77 | # you plan to run it yourself), put the command "set skip_lert" in your |
---|
78 | # ~/.environment file. |
---|
79 | |
---|
80 | if (! $?skip_lert) then |
---|
81 | lert -q # Don't want to see server errors. |
---|
82 | endif |
---|