blob: 2b32aa775b9002612ea86cf261a4839c3661f971 [file] [log] [blame]
# Copyright 2015 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 known kernel errors once per boot"
author "chromium-os-dev@chromium.org"
start on started system-services
script
dmesg_matches() {
if dmesg | grep -q "$1"; then
echo 1
else
echo 0
fi
}
# The metrics library requires a max value of 2 rather than 1
# (http://crbug.com/338015).
metrics_client -e Platform.BatteryAbsent $(
dmesg_matches "ACPI: Battery Slot.*absent") 2
end script