blob: a9bfb1604475f5596a6a55d6b675b935b7d1ddde [file] [log] [blame]
# Copyright 2021 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 "Chromium OS no tpm checker for dynamic TPM"
author "chromium-os-dev@chromium.org"
start on started boot-services and started dbus
stop on stopping boot-services
# This enviroment variable may be modified in the ebuild file.
# The runtime TPM selection feature would be enabled if this variable is true.
env TPM_DYNAMIC=false
pre-start script
# Only start this if there is no TPM on the device.
if [ "$(tpm_version_client)" -ne 0 ]; then
stop
exit 0
fi
end script
# We purposely omit the main process. upstart marks us running
# on the first event, and ignores all subsequent events until we
# stop.