File tree Expand file tree Collapse file tree 1 file changed +22
-5
lines changed
src/luks/dracut/clevis-pin-tpm2 Expand file tree Collapse file tree 1 file changed +22
-5
lines changed Original file line number Diff line number Diff line change 1919#
2020
2121check () {
22- require_binaries clevis-decrypt-tpm2 tpm2_createprimary tpm2_flushcontext \
23- tpm2_load tpm2_unseal tpm2_getcap || return 1
24- require_any_binary tpm2_pcrread tpm2_pcrlist || return 1
22+ require_binaries clevis-decrypt-tpm2 || return 1
23+
24+ if command -v clevis-pin-tpm2 > /dev/null;
25+ then
26+ require_binaries clevis-pin-tpm2 || return 1
27+ else
28+ require_binaries tpm2_createprimary tpm2_flushcontext \
29+ tpm2_load tpm2_unseal tpm2_getcap || return 1
30+ require_any_binary tpm2_pcrread tpm2_pcrlist || return 1
31+ fi
2532 return 0
2633}
2734
@@ -30,11 +37,21 @@ depends() {
3037 return 0
3138}
3239
33- install () {
34- inst_multiple clevis-decrypt-tpm2 tpm2_createprimary tpm2_flushcontext \
40+ install_tpm2_tools () {
41+ inst_multiple tpm2_createprimary tpm2_flushcontext \
3542 tpm2_load tpm2_unseal tpm2_getcap
3643 inst_multiple -o tpm2_pcrread tpm2_pcrlist
44+ }
45+
46+ install () {
47+ inst_multiple clevis-decrypt-tpm2
3748 inst_libdir_file " libtss2-tcti-device.so*"
49+ if command -v clevis-pin-tpm2 > /dev/null;
50+ then
51+ inst_multiple clevis-pin-tpm2
52+ else
53+ install_tpm2_tools
54+ fi
3855}
3956
4057installkernel () {
You can’t perform that action at this time.
0 commit comments