Index: vpd-log.conf |
diff --git a/vpd-log.conf b/vpd-log.conf |
new file mode 100644 |
index 0000000000000000000000000000000000000000..58743251b3772f258102e4d467837ccc99d46f5f |
--- /dev/null |
+++ b/vpd-log.conf |
@@ -0,0 +1,34 @@ |
+# 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. |
+ |
+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
|
+ |
+# This is run-once rather than a service. |
+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.
|
+ |
+pre-start script |
+ VPD_2_0="/var/log/vpd_2.0.txt" |
+ TMP="/tmp/vpd.bin" |
+end script |
+ |
+script |
+ |
+ rm -f $VPD_2_0 |
+ touch $VPD_2_0 |
+ |
+ if [ -x /usr/sbin/vpd -a -x /usr/sbin/flashrom ]; then |
+ 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." |
+ rm -f $TMP |
+ else |
+ echo "Unable to dump VPD 2.0 data." |
+ fi >> $VPD_2_0 |
+ |
+end script |