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
diff --git a/stack.sh b/stack.sh
index 6952fba..b81549a 100755
--- a/stack.sh
+++ b/stack.sh
@@ -524,9 +524,9 @@
     # 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 @@
 
     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