blob: 78d9e90e039a2931a2c151c0e91fa5b60943bac3 [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 "Run ureadahead for ARC++"
author "chromium-os-dev@chromium.org"
# Run this job in parallel with arc_setup_wrapper.sh run_oci hook. The job
# shouldn't be started until 'ureadahead' (which may be in tracing mode)
# is stopped, otherwise ureadahead may corrupt the $PACK file. Depending
# on start-arc-instance ensures that.
start on start-arc-instance
script
{
PACK=/opt/google/containers/android/ureadahead.pack
echo "Start arc-ureadahead"
set -x
# Read-ahead files in the image.
if [ -f "${PACK}" ]; then
ureadahead --pack-file="${PACK}" || \
echo "Failed to start ureadahead pack for ${PACK}"
else
echo "ureadahead pack is not available at ${PACK}"
fi
} 2>&1 | logger -t "${UPSTART_JOB}"
end script