Index: vpd-log.conf |
diff --git a/vpd-log.conf b/vpd-log.conf |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e58e1fca0464f121a68e0aaccd08c739df6109ed |
--- /dev/null |
+++ b/vpd-log.conf |
@@ -0,0 +1,30 @@ |
+# 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. |
+ |
+# vpd-log |
+# |
+# when boot reaches login prompt, dumps VPD information from RO and RW |
+# 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.
|
+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 |
+ 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.
|
+ |
+ 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.
|
+ flashrom -r $TMP > /dev/null || echo "flashrom execute error." |
+ vpd -f "$TMP" -i "RO VPD" -l || echo "RO VPD execute error." |
+ 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.
|
+ rm -f $TMP |
+ else |
+ echo "Unable to dump VPD 2.0 data." |
+ fi >> $VPD_2_0 |
+ fi |
+ |
+end script |