blob: 4ec99666bd27cbdc073ac624ec38d2fa577bdbf0 [file] [log] [blame]
# Copyright (c) 2010 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.
# Detect TPM hardware, and start the trousers daemon.
start on started syslog
# If there is a TPM, and the firmware detected it, and the module is compiled
# in the kernel, or has been already loaded in other ways, then the module
# has created a sysfs entry, and we're done. Otherwise, try loading the tpm
# modules. We use "force=1" because we have to deal with various versions of
# the firmware that don't initialize the pnp table.
if ! test -e /sys/devices/platform/tpm_tis && \
! modprobe tpm_tis force=1 interrupts=0; then
# added by modprobe, but not needed by the emulator
rmmod tpm tpm_bios || :
logger "TPM not available on this system"
# Note, this line is modified by chromeos-factoryinstall.ebuild
# Please do not change without also changing this reference.
start tcsd
end script