blob: 881c2691ebfbfba006ec8f5c4f008d6708a15bca [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 /media/removable for ARC."
author "chromium-os-dev@chromium.org"
start on started arc-removable-media
stop on stopping arc-removable-media
env SOURCE=/media/removable
env DEST=/run/arc/media/removable-default
env UMASK=007
env ANDROID_ROOT_UID=0
env ANDROID_SDCARD_GID=1015
expect fork
pre-start exec logger -t "${UPSTART_JOB}" "Pre-start ${UPSTART_JOB}"
# 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_ROOT_UID}" "${ANDROID_SDCARD_GID}" "full"
post-stop exec logger -t "${UPSTART_JOB}" "Post-stop ${UPSTART_JOB}"