blob: 97d01d3faa9de6f719f89897c0b6358e837fee38 [file] [log] [blame]
# Copyright (c) 2012 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 "Chrome OS post-install cleanup"
author "chromium-os-dev@chromium.org"
# This job handles any cleanup that might be needed on first boot after
# a Chrome OS update has been installed.
start on starting boot-services
# OOM killer should ignore this job.
oom never
# This is a pre-start so that this task will run before the "start" stanza
# of the "starting" task that triggered it.
pre-start script
# Check if we need to run post install tasks. The tasks should be safe
# to be run more than once, as we'll rerun the tasks in case the device
# shuts down before completing the tasks, though it's unlikely to happen.
INSTALL_COMPLETED=/mnt/stateful_partition/.install_completed
if [ -f "${INSTALL_COMPLETED}" ]; then
# Remove XKB cache files, as the files may be incompatible after upgrade.
rm -f /var/lib/xkb/*.xkm
# This has to be done at the end of the block.
rm -f "${INSTALL_COMPLETED}"
fi
end script