blob: 6e3c42301587d1c0dfe10cbad1de72a2cacdfc0e [file] [log] [blame]
# Copyright 2016 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 "Mount /home/chronos/user/MyFiles for ARC."
author "chromium-os-dev@chromium.org"
start on started arc-network
stop on stopping arc-network
env SOURCE=/home/chronos/user/MyFiles
env DEST=/run/arc/media/MyFiles
env UMASK=007
env ANDROID_MEDIA_UID=1023
env ANDROID_MEDIA_GID=1023
expect fork
pre-start script
logger -t "${UPSTART_JOB}" "Pre-start ${UPSTART_JOB}"
if grep -qs "1" /run/chrome/is_arcvm; then
logger -t "${UPSTART_JOB}" "Skipping ${UPSTART_JOB} for ARCVM builds"
stop
exit 0
fi
end script
# systemd-cat is used to redirect stdio from sdcard to journald for logging.
# minijail is used in the mount-passthrough-jailed script.
exec /usr/bin/systemd-cat -t "${UPSTART_JOB}" \
mount-passthrough-jailed "${SOURCE}" "${DEST}" "${UMASK}" \
"${ANDROID_MEDIA_UID}" "${ANDROID_MEDIA_GID}" "full"
post-stop exec logger -t "${UPSTART_JOB}" "Post-stop ${UPSTART_JOB}"