Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dist: add sd-plymouth-tpm2-totp mkinitcpio hook #75

Merged
merged 1 commit into from
Dec 17, 2020

Commits on Dec 15, 2020

  1. dist: add sd-plymouth-tpm2-totp mkinitcpio hook

    mkinitcpio supports two different kinds of initramfs images: one with a busybox
    init (HOOKS=(base udev ...)) and one with a systemd init (HOOKS=(systemd
    sd-...)). Only the former supports the runtime hooks in dist/initcpio/hooks
    that we use to start show-/plymouth-tpm2-totp, the latter relies on system unit
    files to start programs.
    
    This commit adds a new mkinitcpio hook "sd-plymouth-tpm2-totp" to be
    used for systemd-based mkinitcpio initramfs images. It adds a systemd service
    "plymouth-tpm2-totp.service" that triggers plymouth-tpm2-totp once Plymouth has
    been started and /dev/tpm0 is available. While the hook itself is specific to
    mkinitcpio, this service might be useful for other systemd-based initramfs
    generators as well.
    
    Unlike the other currently available hooks, this service currently does not
    allow selecting a different NV index using the kernel command line. As far as I
    am aware, there is no built-in way to supply arguments from the kernel command
    line to systemd units, so the easiest approach might be parsing /proc/cmdline
    directly in plymouth-tpm2-totp. However, this feature is out of scope for this
    commit.
    
    Signed-off-by: Jonas Witschel <diabonas@gmx.de>
    diabonas committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    d0cf440 View commit details
    Browse the repository at this point in the history