mirror of
https://github.com/systemd/systemd.git
synced 2024-11-27 04:03:36 +08:00
32295fa08f
The tool initially just measured the boot phase, but was subsequently extended to measure file system and machine IDs, too. At AllSystemsGo there were request to add more, and make the tool generically accessible. Hence, let's rename the binary (but not the pcrphase services), to make clear the tool is not just measureing the boot phase, but a lot of other things too. The tool is located in /usr/lib/ and still relatively new, hence let's just rename the binary and be done with it, while keeping the unit names stable. While we are at it, also move the tool out of src/boot/ and into its own src/pcrextend/ dir, since it's not really doing boot related stuff anymore.
26 lines
884 B
SYSTEMD
26 lines
884 B
SYSTEMD
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
#
|
|
# This file is part of systemd.
|
|
#
|
|
# systemd is free software; you can redistribute it and/or modify it
|
|
# under the terms of the GNU Lesser General Public License as published by
|
|
# the Free Software Foundation; either version 2.1 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
[Unit]
|
|
Description=TPM2 PCR Barrier (Initialization)
|
|
Documentation=man:systemd-pcrphase-sysinit.service(8)
|
|
DefaultDependencies=no
|
|
Conflicts=shutdown.target
|
|
After=sysinit.target
|
|
Before=basic.target shutdown.target
|
|
ConditionPathExists=!/etc/initrd-release
|
|
ConditionSecurity=tpm2
|
|
ConditionPathExists=/sys/firmware/efi/efivars/StubPcrKernelImage-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
ExecStart={{LIBEXECDIR}}/systemd-pcrextend --graceful sysinit
|
|
ExecStop={{LIBEXECDIR}}/systemd-pcrextend --graceful final
|