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

Issue 6581026: add an upstart script: vpd-log.conf (Closed)

Created:
9 years, 10 months ago by Louis
Modified:
9 years, 4 months ago
CC:
chromium-os-reviews_chromium.org
Visibility:
Public.

Description

add an upstart script: vpd-log.conf This script is going to dump VPD information into /var/log/vpd_2.0.txt to make user read them in chrome://system. VPD (Vital Product Data) are written into BIOS flash during factory. It contains machine-specific information, e.g., mother board serial number, MAC address, 3G module serial number... Those information are important when user sends machine back to service center. Change-Id: I3e555900e8711e99cc02c67b5b6e41647ec0e6c4 BUG=chrome-os-partner:1462 TEST=Tested on Mario. Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=e4c6f1c

Patch Set 1 #

Total comments: 4

Patch Set 2 : Only create the log file if it doesn't exist. #

Total comments: 8

Patch Set 3 : fixed according to Richard's reviews.wq #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -0 lines) Patch
A vpd-log.conf View 1 2 1 chunk +35 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Louis
9 years, 10 months ago (2011-02-24 06:12:12 UTC) #1
Chris Masone
http://codereview.chromium.org/6581026/diff/1/vpd-log.conf File vpd-log.conf (right): http://codereview.chromium.org/6581026/diff/1/vpd-log.conf#newcode10 vpd-log.conf:10: start on stopped boot-complete There may be a better ...
9 years, 10 months ago (2011-02-24 06:25:34 UTC) #2
Chris Masone
Speaking of which :-) http://code.google.com/p/chromium-os/issues/detail?id=12487 On 2011/02/24 06:25:34, Chris Masone wrote: > http://codereview.chromium.org/6581026/diff/1/vpd-log.conf > File ...
9 years, 10 months ago (2011-02-24 06:27:58 UTC) #3
Louis
Chris, thanks for the review. Please see my comments inlined. http://codereview.chromium.org/6581026/diff/1/vpd-log.conf File vpd-log.conf (right): http://codereview.chromium.org/6581026/diff/1/vpd-log.conf#newcode10 ...
9 years, 10 months ago (2011-02-24 10:21:55 UTC) #4
jrbarnette
OK, I've added my comments. Mostly style nits now, 'cause cmasone caught the substantive issues. ...
9 years, 10 months ago (2011-02-24 17:34:17 UTC) #5
Chris Masone
Thanks, Louis. This LGTM with respect to my comments, but please do iterate with Richard ...
9 years, 10 months ago (2011-02-24 18:22:34 UTC) #6
Louis
Richard, Your suggestions make very sense to me. I've rewrite my CL according to your ...
9 years, 10 months ago (2011-02-25 08:50:12 UTC) #7
jrbarnette
9 years, 10 months ago (2011-02-25 16:44:15 UTC) #8
On 2011/02/25 08:50:12, Louis wrote:
> Richard,
> 
> Your suggestions make very sense to me. I've rewrite my CL according to your
> suggestions. Please kindly take a review on it.
> 
Great!  LGTM!

Thanks!


> Thanks.
> 
> Louis
> 
> http://codereview.chromium.org/6581026/diff/5001/vpd-log.conf
> File vpd-log.conf (right):
> 
> http://codereview.chromium.org/6581026/diff/5001/vpd-log.conf#newcode8
> vpd-log.conf:8: # partitions.
> On 2011/02/24 17:34:17, jrbarnette wrote:
> > I've got upcoming changes to try and standardize the style of the
> > comment header here.  This is the style I want to encourage:
> > 
> >     description     "... brief description ..."
> >     author          "chromium-os-dev@chromium.org"
> > 
> >     # Description of the purpose of the job, and any non-obvious
> >     # reasons behind the start and stop conditions.  This shouldn't
> >     # just repeat the 'description' stanza; if that stanza says
> >     # everything, leave out these comments.
> >     start on stopped boot-complete
> > 
> > I'd rather not see phrases that repeat the obvious, like "when boot
> > reaches login prompt, ...":  The 'start on' stanza makes that clear,
> > so the comment is too much like "a++; /* increment a by 1 */".
> > Important things to call out regarding the start conditions would
> > be if there's some important reason for starting after login other
> > than the conventional performance rationale, like a hidden
> > dependency.
> > 
> 
> Done.
> 
> http://codereview.chromium.org/6581026/diff/5001/vpd-log.conf#newcode18
> vpd-log.conf:18: touch $VPD_2_0
> On 2011/02/24 17:34:17, jrbarnette wrote:
> > This is unnecessary; redirection onto the file below will create it.
> 
> Done.
> 
> http://codereview.chromium.org/6581026/diff/5001/vpd-log.conf#newcode20
> vpd-log.conf:20: if [ -x /usr/sbin/vpd -a -x /usr/sbin/flashrom ]; then
> On 2011/02/24 17:34:17, jrbarnette wrote:
> > I think this test is pointless for various reasons:
> >   * Given this job needs them, we shouldn't consider vpd
> >     or flashrom to be optional, so we shouldn't need to test
> >     for their presence.
> >   * This test will prevent vpd from running simply because
> >     of a missing flashrom, and vice versa.  That's not as robust
> >     as I'd like to see.
> 
> Done.
> 
> http://codereview.chromium.org/6581026/diff/5001/vpd-log.conf#newcode23
> vpd-log.conf:23: vpd -f "$TMP" -i "RW VPD" -l || echo "RW VPD execute error."
> On 2011/02/24 17:34:17, jrbarnette wrote:
> > It seems like the logic above could be replaced by something more
> > like this:
> >     if flashrom -r $TMP >/dev/null ; then
> >         vpd -f ...  "RO ..." ...
> >         vpd -f ...  "RW ..." ...
> >     fi
> >     rm -f $TMP
> > 
> > Also, I'd like to see consistent use of quotes around $TMP - either
> > always used, or always omitted (in this context, I prefer always
> > omitted, but consistency is much more important than the
> > particular usage.
> 
> Done.

Powered by Google App Engine
This is Rietveld 408576698