blob: 35bfc06f6d66cc860c154c99c3a8a6ebf78fee5a [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 "System software update service"
author "chromium-os-dev@chromium.org"
# N.B. The chromeos-factoryinstall ebuild edits the 'start on' line so as
# to disable update_engine in factory images. Do not change this without
# also updating that reference.
start on starting system-services
stop on stopping system-services
respawn
expect fork
# Runs the daemon at low/idle IO priority so that updates don't
# impact system responsiveness.
exec ionice -c3 update_engine
# Put update_engine process in its own cgroup.
# Default cpu.shares is 1024.
post-start script
cgroup_dir="/sys/fs/cgroup/cpu/${UPSTART_JOB}"
mkdir -p "${cgroup_dir}"
echo $(status | cut -f 4 -d ' ') > "${cgroup_dir}/tasks"
end script