Skip to content

Commit cef3277

Browse files
committedNov 24, 2022
Refactor 'prereqs' to do what is necessary, instead of instructing the user to do it.
1 parent 52fb7ca commit cef3277

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed
 

‎install.sh

+21-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
11
#!/bin/bash
22

33

4-
function prereqs()
4+
function install_tss2()
5+
{
6+
#apt install libtss2 libtss2-fapi1 libtss2-rc0 libtss2-tctildr0
7+
#are all of these needed? perhaps even the 'libtss2-dev' as used before.
8+
apt install libtss2 libtss2-fapi1 libtss2-rc0 libtss2-tctildr0
9+
}
10+
11+
function mkcrypttab()
12+
{
13+
if [[ -f /etc/crypttab ]] ; then
14+
echo "WARNING: using existing crypttab" 1>&2
15+
else
16+
echo "WARNING: creating default crypttab" 1>&2
17+
./mkcrypttab.sh >> /etc/crypttab
18+
fi
19+
}
20+
21+
function prereqs_old()
522
{
623
#sudo apt install libtss2-dev
724
#libtss2-dev libtss2-fapi1 libtss2-rc0 libtss2-tctildr0
@@ -61,7 +78,7 @@ function update_initramfs()
6178
function tldr_just_work_old()
6279
{
6380
#This compiles System D with TPM2 support. Apparently not needed for a new install anymore, but left 'just in case'.
64-
prereqs && \
81+
prereqs_old && \
6582
install_docker && \
6683
compile_systemd_with_tpm2 && \
6784
install_systemd_with_tpm2 && \
@@ -72,7 +89,8 @@ function tldr_just_work_old()
7289

7390
function tldr_just_work()
7491
{
75-
prereqs && \
92+
mkcrypttab && \
93+
install_tss2 && \
7694
install_crypt_setup_mod_scripts && \
7795
update_initramfs && \
7896
echo SystemD with TPM2 installation complete.

0 commit comments

Comments
 (0)
Please sign in to comment.