| # Copyright (c) 2012 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 "Simple Watchdog daemon" |
| author "chromium-os-dev@chromium.org" |
| |
| start on started boot-services |
| stop on stopping boot-services |
| respawn |
| |
| pre-start script |
| # Depending on kernel output strings is fragile. :/ |
| # Could monitor daisydog output instead? |
| # Only better since this conf file is part of daisydog ebuild. |
| # |
| # First message (Watchdog timed out) is from 3.4 kernel |
| # Second message (Last reset was...) is from 3.8 kernel |
| |
| MSG1="Watchdog timed out" |
| MSG2="Last reset was system watchdog timer reset" |
| if dmesg | fgrep -q -e "${MSG1}" -e "${MSG2}" ; then |
| metrics_client -v HwWatchdogReboot |
| fi |
| end script |
| |
| exec chrt -r 99 /sbin/minijail0 -u watchdog -g watchdog -- /usr/sbin/daisydog |