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

Side by Side 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, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 description "dumps VPD information for chrome://system"
6 author "chromium-os-dev@chromium.org"
7
8 # VPD (Vital Product Data) information is shown on chrome://system for
9 # user, feedback, and partner's customer service center.
10 #
11 # This script will read VPD from BIOS and dump into /var/log/vpd_2.0.txt.
12 # It should be executed at least once some time after boot and before user
13 # types "chrome://system" in chrome location bar.
14 #
15 # Since VPD utility could invoke flashrom utility to access BIOS, which is
16 # slow, this script should be run after calculating boot time.
17 # Hence, later than boot-complete can be acceptable.
18 start on stopped boot-complete
19
20 script
21 VPD_2_0="/var/log/vpd_2.0.txt"
22 TMP="/tmp/vpd.bin"
23
24 # Since we don't change the VPD data too often, only create the log file
25 # if it does not exist.
26 if [ ! -f $VPD_2_0 ]; then
27 if flashrom -r $TMP > /dev/null ; then
28 vpd -f $TMP -i "RO VPD" -l || echo "RO VPD execute error."
29 vpd -f $TMP -i "RW VPD" -l || echo "RW VPD execute error."
30 else
31 echo "flashrom execute error."
32 fi >> $VPD_2_0
33 rm -f $TMP
34 fi
35 end script
OLDNEW
« 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