Check-in Number:
|
4755 | |
Date: |
2004-Oct-22 21:53:02 (local)
2004-Oct-22 19:53:02 (UTC) |
User: | rse |
Branch: | |
Comment: |
do not use BASH_ENV because it makes trouble in Bash based applications and move the login/logout tracing to due.term.sh module |
Tickets: |
|
Inspections: |
|
Files: |
|
ossp-pkg/due/.bash_login 1.2 -> 1.3
--- .bash_login 2004/10/04 15:34:50 1.2
+++ .bash_login 2004/10/22 19:53:02 1.3
@@ -27,16 +27,7 @@
## ~/.bash_login: GNU Bash login-shell configuration
##
-# path to bash environment init script
-BASH_ENV=$HOME/.bashrc
-
-# source the standard environment script
-. $BASH_ENV
-
-# welcome and goodbye
-if expr $- : ".*i.*" >/dev/null; then
- echo "$HOSTNAME: user $USER (${SSHUSER:-unknown}), login at `date`"
- echo "#[`date '+%Y-%m-%d/%H:%M'`] login by user ${SSHUSER:-unknown}" >>$HISTFILE
- trap 'echo "$HOSTNAME: user $USER (${SSHUSER:-unknown}), logout at `date`"' 0
-fi
+# activate OSSP due
+source ~/.duerc
+due -v load all -local
|
|
ossp-pkg/due/.bashrc 1.2 -> 1.3
--- .bashrc 2004/10/22 19:32:51 1.2
+++ .bashrc 2004/10/22 19:53:02 1.3
@@ -27,6 +27,7 @@
## ~/.bashrc: GNU Bash sub-shell configuration
##
+# activate OSSP due
source ~/.duerc
due -v load all -local
|
|
ossp-pkg/due/.due/due.term.sh 1.3 -> 1.4
--- due.term.sh 2004/10/22 19:32:52 1.3
+++ due.term.sh 2004/10/22 19:53:03 1.4
@@ -79,3 +79,13 @@
done
}
+# login/logout tracing
+if [ $SHLVL -eq 0 -a ".$BASH_INTERACTIVE" = .yes ]; then
+ # shell history annotation
+ echo "#[`date '+%Y-%m-%d/%H:%M'`] login by user ${SSHUSER:-unknown}" >>$HISTFILE
+
+ # interactive messages
+ echo "$HOSTNAME: user $USER ${SSHUSER:+(${SSHUSER:-unknown})}, login at `date`"
+ trap 'echo "$HOSTNAME: user $USER${SSHUSER:+ (${SSHUSER:-unknown})}, logout at `date`"' 0
+fi
+
|
|