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. | |
jrbarnette
2011/02/24 17:34:17
I've got upcoming changes to try and standardize t
Louis
2011/02/25 08:50:12
Done.
| |
9 start on stopped boot-complete | |
10 | |
11 script | |
12 VPD_2_0="/var/log/vpd_2.0.txt" | |
13 TMP="/tmp/vpd.bin" | |
14 | |
15 # Since we don't change the VPD data too often, only create the log file | |
16 # if it does not exist. | |
17 if [ ! -f "$VPD_2_0" ]; then | |
18 touch $VPD_2_0 | |
jrbarnette
2011/02/24 17:34:17
This is unnecessary; redirection onto the file bel
Louis
2011/02/25 08:50:12
Done.
| |
19 | |
20 if [ -x /usr/sbin/vpd -a -x /usr/sbin/flashrom ]; then | |
jrbarnette
2011/02/24 17:34:17
I think this test is pointless for various reasons
Louis
2011/02/25 08:50:12
Done.
| |
21 flashrom -r $TMP > /dev/null || echo "flashrom execute error." | |
22 vpd -f "$TMP" -i "RO VPD" -l || echo "RO VPD execute error." | |
23 vpd -f "$TMP" -i "RW VPD" -l || echo "RW VPD execute error." | |
jrbarnette
2011/02/24 17:34:17
It seems like the logic above could be replaced by
Louis
2011/02/25 08:50:12
Done.
| |
24 rm -f $TMP | |
25 else | |
26 echo "Unable to dump VPD 2.0 data." | |
27 fi >> $VPD_2_0 | |
28 fi | |
29 | |
30 end script | |
OLD | NEW |