Browse code

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

David Ripton authored on 2013/03/06 23:58:39
Showing 1 changed files
... ...
@@ -524,9 +524,9 @@ if [[ -n "$LOGFILE" ]]; then
524 524
     # as the template to search for, appending '.*' to match the date
525 525
     # we added on earlier runs.
526 526
     LOGDIR=$(dirname "$LOGFILE")
527
-    LOGNAME=$(basename "$LOGFILE")
527
+    LOGFILENAME=$(basename "$LOGFILE")
528 528
     mkdir -p $LOGDIR
529
-    find $LOGDIR -maxdepth 1 -name $LOGNAME.\* -mtime +$LOGDAYS -exec rm {} \;
529
+    find $LOGDIR -maxdepth 1 -name $LOGFILENAME.\* -mtime +$LOGDAYS -exec rm {} \;
530 530
     LOGFILE=$LOGFILE.${CURRENT_LOG_TIME}
531 531
     SUMFILE=$LOGFILE.${CURRENT_LOG_TIME}.summary
532 532
 
... ...
@@ -556,8 +556,8 @@ if [[ -n "$LOGFILE" ]]; then
556 556
 
557 557
     echo_summary "stack.sh log $LOGFILE"
558 558
     # Specified logfile name always links to the most recent log
559
-    ln -sf $LOGFILE $LOGDIR/$LOGNAME
560
-    ln -sf $SUMFILE $LOGDIR/$LOGNAME.summary
559
+    ln -sf $LOGFILE $LOGDIR/$LOGFILENAME
560
+    ln -sf $SUMFILE $LOGDIR/$LOGFILENAME.summary
561 561
 else
562 562
     # Set up output redirection without log files
563 563
     # Copy stdout to fd 3