-
Notifications
You must be signed in to change notification settings - Fork 0
/
.shlogin
47 lines (41 loc) · 1.18 KB
/
.shlogin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#
# .shlogin - login shell startup for plain Bourne Shell, sourced by ~/.profile
#
# N.B.: this is very similar to ~/.ashlogin!
#
#ident "@(#)HOME:.shlogin 37.5 24/10/03 10:33:41 (woods)"
if [ -r ${HOME}/.shinter ]; then
. ${HOME}/.shinter
elif [ -z "${sh_is_interactive}" ]; then
echo "$0:.shlogin: WARNING: ${HOME}/.shinter not found"
fi
if ${sh_is_interactive}; then
#
# Commands for interactive shells.
#
echo "$0: setup for Bourne Shell"
# for emacs timeclock.el
#
if [ ! -f ${HOME}/.timelog ] ; then
touch ${HOME}/.timelog
fi
if [ "$LOGNAME" = root ] ; then
PS1="[$TTYN]<$LOGNAME@$UUNAME> # "
else
PS1="[$TTYN]<$LOGNAME@$UUNAME> $ "
fi
else
echo "$0: WARNING: ~/.shlogin being sourced by a non-interactive shell! (\$-='$-')"
fi
# this may not do anything for sub-shells but let you type '. $ENV'
#
# (POSIX(2008) says ENV is only to be read by interactive shells, while more
# modern NetBSD and some other systems will read it for all shells (unless in
# "posix" mode), thus placing it herein, but most older shells ignore $ENV
# entirely)
#
ENV=$HOME/.shrc ; export ENV
if [ -z "$LOGNAME" ] ; then
# some systems won't allow this...
LOGNAME=${USER} ; export LOGNAME
fi