| # Copyright 2020 The ChromiumOS Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| description "Create ARC data directories for the user" |
| author "chromium-os-dev@chromium.org" |
| |
| start on starting arcvm-post-login-services |
| stop on stopping arcvm-post-login-services |
| |
| # Use 'never' since terminating this job fails ARC to start. |
| oom score never |
| task |
| |
| import CHROMEOS_USER |
| |
| env ANDROID_MUTABLE_SOURCE=/run/arcvm/android-data/mount |
| |
| pre-start script |
| # Run arc-create-data in /run/namespaces/mnt_concierge. This namespace is |
| # created by vm_concierge.conf, so Concierge must be running in order to |
| # enter the namespace. This relies on ArcVmClientAdapter in Chrome to ensure |
| # that Concierge is started before arc-create-data. |
| exec /sbin/minijail0 \ |
| -c 'cap_dac_override,cap_dac_read_search,cap_chown,cap_fowner,cap_sys_admin+eip' \ |
| --uts -e -l -N -p -K -v \ |
| -V /run/namespaces/mnt_concierge \ |
| -- /usr/sbin/arc-create-data --log_tag=arc-create-data |
| end script |
| |
| # This is needed to ensure this job doesn't remain in the started state. |
| exec /bin/true |