From c5f8e8d2a9f9ddf00240611ad3c98b9a02ff5c6d Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Fri, 21 Nov 2008 10:38:04 +0100 Subject: [PATCH] Enhance debug messages: print a line for each script. If the file "/tmp/ConfigDebug.$USER" exists, all the scripts print out a line with its name when run. --- sys/bashrc | 3 ++- sys/profile | 3 ++- user/bash_logout | 2 ++ user/bash_profile | 2 ++ user/bashrc | 2 ++ 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/bashrc b/sys/bashrc index 12f1941..fe509e3 100644 --- a/sys/bashrc +++ b/sys/bashrc @@ -20,7 +20,8 @@ # 2004-05-27, alex@Arthur.Ath.CX # -#echo "/etc/bash.bashrc ..." +[ -e /tmp/ConfigDebug.$USER ] && echo " >> /etc/bash.bashrc ..." + BASHRCREAD="true" [ -z "$PROFILEREAD" -a -r /etc/profile ] && source /etc/profile diff --git a/sys/profile b/sys/profile index 77b7c31..c4a05d5 100644 --- a/sys/profile +++ b/sys/profile @@ -48,7 +48,8 @@ # - Initial version. # -#echo "/etc/profile ..." +[ -e /tmp/ConfigDebug.$USER ] && echo " >> /etc/profile ..." + PROFILEREAD="true" export PROFILEREAD diff --git a/user/bash_logout b/user/bash_logout index a9766fd..59a12fc 100644 --- a/user/bash_logout +++ b/user/bash_logout @@ -8,6 +8,8 @@ # - Initial version. # +[ -e /tmp/ConfigDebug.$USER ] && echo " >> ~/.bash_logout ..." + # clean up SSH agents [ $SSH_AGENT_PID ] && eval `ssh-agent -k` diff --git a/user/bash_profile b/user/bash_profile index 04876c7..9801fd5 100644 --- a/user/bash_profile +++ b/user/bash_profile @@ -9,6 +9,8 @@ # - initial version. # +[ -e /tmp/ConfigDebug.$USER ] && echo " >> ~/.bash_profile ..." + [ -n "$LANG" ] || export LANG="de_DE.ISO8859-1" export LC_MESSAGES="C" export EMAIL="alex@barton.de" diff --git a/user/bashrc b/user/bashrc index a006149..58ad4ee 100644 --- a/user/bashrc +++ b/user/bashrc @@ -7,6 +7,8 @@ # - Initial version. # +[ -e /tmp/ConfigDebug.$USER ] && echo " >> ~/.bashrc ..." + [ -z "$BASHRCREAD" -a -r /etc/bash.bashrc ] && source /etc/bash.bashrc [ -z "$BASHRCREAD" -a -r /etc/bashrc ] && source /etc/bashrc -- 2.39.2