In function fixPermissions(). I am seeing this code snippet and comment.
diskutil repairPermissions / | tee -a "$LOGFILE" wait # TODO: Fix this exit status. This is bogus, since it's actually the result of # the tee operation rather than the diskutil operation. loggit "Permissions have been repaired. -$?-"
To overcome this, you could either use "set -o pipefail" or ${PIPESTATUS[0]}
REF: http://tldp.org/LDP/abs/html/internalvariables.html#PIPESTATUSREF
-Logu