Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Unified Diff: vpd-log.conf

Issue 6581026: add an upstart script: vpd-log.conf (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/init.git@master
Patch Set: fixed according to Richard's reviews.wq Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vpd-log.conf
diff --git a/vpd-log.conf b/vpd-log.conf
new file mode 100644
index 0000000000000000000000000000000000000000..663b6ef8b5e5d406c25c1355cd331b3be812caa0
--- /dev/null
+++ b/vpd-log.conf
@@ -0,0 +1,35 @@
+# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+description "dumps VPD information for chrome://system"
+author "chromium-os-dev@chromium.org"
+
+# VPD (Vital Product Data) information is shown on chrome://system for
+# user, feedback, and partner's customer service center.
+#
+# This script will read VPD from BIOS and dump into /var/log/vpd_2.0.txt.
+# It should be executed at least once some time after boot and before user
+# types "chrome://system" in chrome location bar.
+#
+# Since VPD utility could invoke flashrom utility to access BIOS, which is
+# slow, this script should be run after calculating boot time.
+# Hence, later than boot-complete can be acceptable.
+start on stopped boot-complete
+
+script
+ VPD_2_0="/var/log/vpd_2.0.txt"
+ TMP="/tmp/vpd.bin"
+
+ # Since we don't change the VPD data too often, only create the log file
+ # if it does not exist.
+ if [ ! -f $VPD_2_0 ]; then
+ if flashrom -r $TMP > /dev/null ; then
+ vpd -f $TMP -i "RO VPD" -l || echo "RO VPD execute error."
+ vpd -f $TMP -i "RW VPD" -l || echo "RW VPD execute error."
+ else
+ echo "flashrom execute error."
+ fi >> $VPD_2_0
+ rm -f $TMP
+ fi
+end script
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698