Chromium Code Reviews| Index: util/dump_vpd_log |
| diff --git a/util/dump_vpd_log b/util/dump_vpd_log |
| new file mode 100755 |
| index 0000000000000000000000000000000000000000..d895ad360cddc672c3eb75415a3cd55ef9a80c5b |
| --- /dev/null |
| +++ b/util/dump_vpd_log |
| @@ -0,0 +1,23 @@ |
| +#!/bin/sh |
| +# |
| +# Helper function to dump VPD RO/RW content into /var/log/vpd_2.0.txt |
| +# |
| +# Used in: |
| +# + OOBE reads this log file for the default locale setting. |
| +# + chrome://system reads this log file. |
| +# |
| +VPD_2_0="/var/log/vpd_2.0.txt" |
| + |
| +if [ "$1" = "--force" ]; then |
| + force=1 |
| +else |
| + force=0 |
| +fi |
| + |
| +# 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 || $force -eq 1 ]; then |
| + vpd -i "RO_VPD" -l || echo "RO VPD execute error." |
| + vpd -i "RW_VPD" -l || echo "RW VPD execute error." |
| +fi >>$VPD_2_0 |
|
Dmitry Polukhin
2011/03/11 07:56:51
What about making file creation atomic? I.e. redir
Louis
2011/03/11 08:56:17
Good point. Please see the new version.
On 2011/0
|
| + |