| # Copyright 2017 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 "Turn the container into a fully functional one" |
| author "chromium-os-dev@chromium.org" |
| |
| start on continue-arc-boot |
| stop on stop-arc-instance or stopping ui |
| |
| # The following environment variables are passed from session_manager |
| # and are imported from the event that starts the job. |
| import CHROMEOS_DEV_MODE |
| import CHROMEOS_INSIDE_VM |
| import CHROMEOS_USER |
| import CONTAINER_PID |
| import COPY_PACKAGES_CACHE |
| import DEMO_SESSION_APPS_PATH |
| import DISABLE_BOOT_COMPLETED_BROADCAST |
| import IS_DEMO_SESSION |
| import LOCALE |
| import PREFERRED_LANGUAGES |
| import SKIP_PACKAGES_CACHE_SETUP |
| import SUPERVISION_TRANSITION |
| |
| export CONTAINER_PID |
| |
| # Do everything in pre-start to block session_manager. |
| pre-start exec /sbin/minijail0 -c \ |
| cap_chown,cap_dac_read_search,cap_dac_override,cap_fowner,cap_sys_admin+e \ |
| -- /usr/sbin/arc-setup --mode=boot-continue "--log_tag=${UPSTART_JOB}" |
| |
| # This file doesn't have a post-stop script. arc-lifetime's cleans things up. |