OLD | NEW |
(Empty) | |
| 1 #!/bin/sh |
| 2 # |
| 3 # Helper function to dump VPD RO/RW content into /var/log/vpd_2.0.txt |
| 4 # |
| 5 # Used in: |
| 6 # + OOBE reads this log file for the default locale setting. |
| 7 # + chrome://system reads this log file. |
| 8 # |
| 9 TMP="/tmp/vpd_2.0.txt" |
| 10 VPD_2_0="/var/log/vpd_2.0.txt" |
| 11 |
| 12 if [ "$1" = "--force" ]; then |
| 13 force=1 |
| 14 else |
| 15 force=0 |
| 16 fi |
| 17 |
| 18 # Since we don't change the VPD data too often, only create the log file |
| 19 # if it does not exist. |
| 20 if [ ! -f $VPD_2_0 -o $force -eq 1 ]; then |
| 21 rm -f $TMP |
| 22 (vpd -i "RO_VPD" -l || echo "RO VPD execute error.") >> $TMP |
| 23 (vpd -i "RW_VPD" -l || echo "RW VPD execute error.") >> $TMP |
| 24 chmod go-stwx $TMP |
| 25 mv -f $TMP $VPD_2_0 |
| 26 fi |
| 27 |
OLD | NEW |