From 406019a74e179e39eeae940e11facd21ea1b8581 Mon Sep 17 00:00:00 2001 From: David Ripton Date: Wed, 6 Mar 2013 09:58:39 -0500 Subject: [PATCH] Rename LOGNAME to LOGFILENAME. LOGNAME has historically been used for the username. Using it for the logfile name causes confusion. For example, Python's getpass.getuser() will return the value of LOGNAME. Change-Id: I3f569d54f93c4898654fddb91f3b569831e75a2c --- stack.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stack.sh b/stack.sh index 6952fba2aa..b81549a43f 100755 --- a/stack.sh +++ b/stack.sh @@ -524,9 +524,9 @@ if [[ -n "$LOGFILE" ]]; then # as the template to search for, appending '.*' to match the date # we added on earlier runs. LOGDIR=$(dirname "$LOGFILE") - LOGNAME=$(basename "$LOGFILE") + LOGFILENAME=$(basename "$LOGFILE") mkdir -p $LOGDIR - find $LOGDIR -maxdepth 1 -name $LOGNAME.\* -mtime +$LOGDAYS -exec rm {} \; + find $LOGDIR -maxdepth 1 -name $LOGFILENAME.\* -mtime +$LOGDAYS -exec rm {} \; LOGFILE=$LOGFILE.${CURRENT_LOG_TIME} SUMFILE=$LOGFILE.${CURRENT_LOG_TIME}.summary @@ -556,8 +556,8 @@ if [[ -n "$LOGFILE" ]]; then echo_summary "stack.sh log $LOGFILE" # Specified logfile name always links to the most recent log - ln -sf $LOGFILE $LOGDIR/$LOGNAME - ln -sf $SUMFILE $LOGDIR/$LOGNAME.summary + ln -sf $LOGFILE $LOGDIR/$LOGFILENAME + ln -sf $SUMFILE $LOGDIR/$LOGFILENAME.summary else # Set up output redirection without log files # Copy stdout to fd 3