summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@google.com>2011-04-12 20:27:54 -0700
committerBill Richardson <wfrichar@google.com>2011-04-12 20:27:54 -0700
commit480a323fe7fb181df397b64bfe1abe57338d74af (patch)
treee81b64a71cf66bed9f9d05425d28ac05ad19e421
parentb5633c6f65ac593769d615970a146717ee4d328c (diff)
downloadvboot-480a323fe7fb181df397b64bfe1abe57338d74af.tar.gz
Put the final output of dev_debug_vboot under /var/log/
Change-Id: I9e7a947541eb6a5b56556038a254ad4017b349b4 R=jimhebert@chromium.org,gauravsh@chromium.org BUG=chromium-os:8947 TEST=manual Boot, wait 60 seconds, navigate to chrome://system. Click the "Expand" button for "verified boot". You should see useful information. Review URL: http://codereview.chromium.org/6840005
-rwxr-xr-xutility/dev_debug_vboot11
1 files changed, 4 insertions, 7 deletions
diff --git a/utility/dev_debug_vboot b/utility/dev_debug_vboot
index b86aafbd..69c18e3d 100755
--- a/utility/dev_debug_vboot
+++ b/utility/dev_debug_vboot
@@ -13,10 +13,8 @@
PATH=/bin:/sbin:/usr/bin:/usr/sbin
TMPDIR=$(mktemp -d /tmp/debug_vboot_XXXXXXXXX)
-LOGFILE=noisy.log
-# The public file must live directly in /tmp, not in a subdirectory.
-# See http://crosbug.com/8947
-PUBLOGFILE=/tmp/debug_vboot_noisy.log
+LOGFILE="${TMPDIR}/noisy.log"
+PUBLOGFILE="/var/log/debug_vboot_noisy.log"
# TODO(wfrichar): Need to support ARM. The hard disk path is likely different.
# We can use 'crossystem arch' to distinguish between x86 and ARM.
@@ -24,8 +22,7 @@ HD=/dev/sda
cleanup() {
if [ -z "${USE_EXISTING:-}" ]; then
- # See http://crosbug.com/8947
- cp --no-target-directory --remove-destination "${LOGFILE}" "${PUBLOGFILE}"
+ cp -f "${LOGFILE}" "${PUBLOGFILE}"
info "exporting log file as ${PUBLOGFILE}"
fi
if [ -n "${CLEANUP:-}" ]; then
@@ -109,7 +106,7 @@ if [ -n "${1:-}" ]; then
fi
[ -d ${TMPDIR} ] || mkdir -p ${TMPDIR} || exit 1
-cd ${TMPDIR}
+cd ${TMPDIR} || exit 1
echo "$0 $*" > "$LOGFILE"
log date
echo "Saving verbose log as $(pwd)/$LOGFILE"