blob: 53fbdf836730a38cadd931569488acf9986ec611 [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 ARC++ image files"
author "chromium-os-dev@chromium.org"
start on starting boot-services
env LOGFILE=/var/log/arc-system-mount.log
env ENVFILE=/etc/init/arc-setup-env
# Do everything in pre-start to block arc-ureadahead job.
pre-start script
exec > $LOGFILE 2>&1
echo "$(date --rfc-3339=ns): Pre-start arc-system-mount"
set -x
. $ENVFILE
# Mount images. The images will never be unmounted.
exec /usr/sbin/arc-setup --onetime-setup
end script
# This job does not have script/exec stanza, so it is considered running forever
# once started. See: http://upstart.ubuntu.com/cookbook/#jobs-that-run-forever
# This is for push_to_device.py, NOT for production.
post-stop script
exec >> $LOGFILE 2>&1
echo "$(date --rfc-3339=ns): Post-stop arc-system-mount"
set +e -x
. $ENVFILE
# Unmount images.
exec /usr/sbin/arc-setup --onetime-stop
end script