| # Copyright (c) 2014 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. |
| |
| description "Report the EC being in TPSRESET state" |
| author "chromium-os-dev@chromium.org" |
| |
| start on started system-services |
| |
| script |
| # Check if the EC is in TPSRESET state and if so report it, but only once |
| # (by design, the EC stays in that state forever). |
| EC_RESET_FILE=/home/chronos/.ec.tpsreset |
| if ectool chipinfo | grep -q TPSRESET && |
| test ! -f $EC_RESET_FILE |
| then |
| metrics_client -v Ec.TpsReset |
| su chronos -c "touch $EC_RESET_FILE" |
| fi |
| end script |