Bertrand SIMONNET | ebad658 | 2014-04-10 11:27:22 -0700 | [diff] [blame] | 1 | # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | description "Initialize crash reporting services" |
| 6 | author "chromium-os-dev@chromium.org" |
| 7 | |
| 8 | # This job merely initializes its service and then terminates; the |
| 9 | # actual checking and reporting of crash dumps is triggered by an |
| 10 | # hourly cron job. |
| 11 | start on starting system-services |
| 12 | |
| 13 | pre-start script |
| 14 | mkdir -p /var/spool |
Kees Cook | 554c898 | 2014-11-24 16:15:37 -0800 | [diff] [blame] | 15 | |
| 16 | # Only allow device coredumps on a "developer system". |
| 17 | if ! is_developer_end_user; then |
| 18 | # consumer end-user - disable device coredumps, if driver exists. |
| 19 | echo 1 > /sys/class/devcoredump/disabled || true |
| 20 | fi |
Bertrand SIMONNET | ebad658 | 2014-04-10 11:27:22 -0700 | [diff] [blame] | 21 | end script |
| 22 | |
| 23 | # crash_reporter uses argv[0] as part of the command line for |
| 24 | # /proc/sys/kernel/core_pattern. That command line is invoked by |
| 25 | # the kernel, and can't rely on PATH, so argv[0] must be a full |
| 26 | # path; we invoke it as such here. |
| 27 | exec /sbin/crash_reporter --init |