blob: c9520326212368974d97a6e6298471617c1744c6 [file] [log] [blame]
# Copyright 2018 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 "Run the shill network connection manager"
author "chromium-os-dev@chromium.org"
# shill termination may take more than 5s (the default kill timeout) in some
# cases (e.g. it needs to disconnect a cellular modem from the network). A
# longer kill timeout is used to ensure that shill terminates properly in most
# cases. Also, stop shill on "starting pre-shutdown" so its exiting blocks the
# chromeos_shutdown script from running (jobs that "stop on stopping
# boot-services" may still be running in parallel with chromeos_shutdown if
# they do not exit quickly).
start on @expected_started_services@
stop on starting pre-shutdown
kill timeout 10
respawn
expect fork
# Default parameters to be overridden by upstart configuration.
env SHILL_LOG_LEVEL=0
env SHILL_LOG_SCOPES=
# Disable noisy libchrome and libbrillo VLOGs by default
env SHILL_LOG_VMODULES="object_proxy=0,dbus_object=0,bus=0"
env SHILL_PASSIVE_MODE=
env SHILL_PREPEND_DNS_SERVERS=
env SHILL_ACCEPT_HOSTNAME_FROM=
env SHILL_MINIMUM_MTU=
env ALLOWED_DEVICES=
env BLOCKED_DEVICES=
env DHCPV6_ENABLED_DEVICES=
# Hook for mod_for_test_scripts/100setupTestingInterface.
env SHILL_TEST_DEVICES=""
# Allow the parameters to be overridden by upstart commands and events.
import ALLOWED_DEVICES
import BLOCKED_DEVICES
import DHCPV6_ENABLED_DEVICES
import SHILL_ACCEPT_HOSTNAME_FROM
import SHILL_LOG_LEVEL
import SHILL_LOG_SCOPES
import SHILL_LOG_VMODULES
import SHILL_MINIMUM_MTU
import SHILL_PASSIVE_MODE
import SHILL_PREPEND_DNS_SERVERS
import SHILL_TEST_DEVICES
# Make shill killable, because if it has a leak it's better to
# restart it than to OOM-panic.
oom score -100
# Let the daemon crash if it grows too much. "as" is "address space" (vm
# size). We expect a typical VM size of about 40MB for the daemon.
limit as 200000000 unlimited
pre-start exec /usr/share/cros/init/shill-pre-start.sh
post-stop exec bootstat shill-stop
exec /usr/share/cros/init/shill.sh