blob: 35bfc06f6d66cc860c154c99c3a8a6ebf78fee5a [file] [log] [blame]
Bertrand SIMONNET01ca1fb2014-03-04 10:06:26 -08001# Copyright (c) 2012 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
5description "System software update service"
6author "chromium-os-dev@chromium.org"
7
8# N.B. The chromeos-factoryinstall ebuild edits the 'start on' line so as
9# to disable update_engine in factory images. Do not change this without
10# also updating that reference.
11start on starting system-services
12stop on stopping system-services
13respawn
14
15expect fork
16
17# Runs the daemon at low/idle IO priority so that updates don't
18# impact system responsiveness.
19exec ionice -c3 update_engine
20
21# Put update_engine process in its own cgroup.
22# Default cpu.shares is 1024.
23post-start script
24 cgroup_dir="/sys/fs/cgroup/cpu/${UPSTART_JOB}"
25 mkdir -p "${cgroup_dir}"
26 echo $(status | cut -f 4 -d ' ') > "${cgroup_dir}/tasks"
27end script