blob: d65156a85a07804c9c0a309838dcefb6d6c36bd7 [file] [log] [blame]
# 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 "Chromium OS debug daemon"
author "chromium-os-dev@chromium.org"
start on x-started
stop on stopping ui or starting halt or starting reboot
respawn
pre-start script
TRACING=/sys/kernel/debug/tracing
# NB: check for tracing dir in case the kernel config changes
if [ -d "${TRACING}" ]; then
# enable debugd write access for systrace helper
for file in buffer_size_kb set_event trace trace_clock trace_marker \
tracing_on; do
chgrp debugd ${TRACING}/${file} && chmod g+w ${TRACING}/${file}
done
fi
end script
exec /sbin/debugd