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
This commit is contained in:
Bill Richardson
2011-04-12 20:27:54 -07:00
parent b5633c6f65
commit 480a323fe7

View File

@@ -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"