Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 # vpd-log | |
| 6 # | |
| 7 # when boot reaches login prompt, dumps VPD information from RO and RW | |
| 8 # partitions. | |
| 9 | |
| 10 start on stopped boot-complete | |
|
Chris Masone
2011/02/24 06:25:34
There may be a better time to trigger this, and a
Louis
2011/02/24 10:21:55
I intended putting this after boot-complete so tha
| |
| 11 | |
| 12 # This is run-once rather than a service. | |
| 13 task | |
|
Chris Masone
2011/02/24 06:25:34
Heh. I recently found out from jrbarnette that we
Louis
2011/02/24 10:21:55
Done.
| |
| 14 | |
| 15 pre-start script | |
| 16 VPD_2_0="/var/log/vpd_2.0.txt" | |
| 17 TMP="/tmp/vpd.bin" | |
| 18 end script | |
| 19 | |
| 20 script | |
| 21 | |
| 22 rm -f $VPD_2_0 | |
| 23 touch $VPD_2_0 | |
| 24 | |
| 25 if [ -x /usr/sbin/vpd -a -x /usr/sbin/flashrom ]; then | |
| 26 flashrom -r $TMP > /dev/null || echo "flashrom execute error." | |
| 27 vpd -f "$TMP" -i "RO VPD" -l || echo "RO VPD execute error." | |
| 28 vpd -f "$TMP" -i "RW VPD" -l || echo "RW VPD execute error." | |
| 29 rm -f $TMP | |
| 30 else | |
| 31 echo "Unable to dump VPD 2.0 data." | |
| 32 fi >> $VPD_2_0 | |
| 33 | |
| 34 end script | |
| OLD | NEW |