initial checkin
[zsh-lovers.git] / zsh_people / strcat / zlogout
1 # $Id: .zlogout,v 1.1 2004/06/10 10:01:29 dope Exp dope $
2
3 # .zlogin is sourced in login shells.  It should contain commands that
4 # should be executed only in login shells.  It should be used to run a
5 # series of external commands (fortune, msgs, etc).
6
7 FORTUNE="/usr/games/fortune"
8 FORTUNE_OPTS="-s"
9 COWSAY="/usr/local/bin/cowsay"
10
11 # Only reset and clear if it's at the physical console.
12 if [ ! $DISPLAY ]; then
13         if [ ! $SSH_CLIENT ]; then
14                 reset
15         fi
16 fi
17
18 # Clear the screen so next person can't see anything from the session.
19 clear 
20
21 # Only for a normal user in the console, make the cow say a fortune *g*
22 if [ "$UID" != 0 ] && [ ! "${DISPLAY}" ]; then
23         if [ -x ${COWSAY} ]; then
24                 if [ -x ${FORTUNE} ]; then
25                         ${FORTUNE} ${FORTUNE_OPTS} | ${COWSAY} -nW80; echo
26                 fi
27         elif [ -x ${FORTUNE} ]; then
28                 ${FORTUNE} ${FORTUNE_OPTS}; echo
29         fi
30 fi