fix: Move socket to /run (#375)
This commit is contained in:
parent
bf5f894c76
commit
63f1a1ec9f
2 changed files with 4 additions and 4 deletions
|
@ -56,13 +56,13 @@ if [[ "${BOOT_MODE,,}" != "legacy" ]]; then
|
|||
|
||||
if [[ "${BOOT_MODE,,}" == "windows" ]]; then
|
||||
|
||||
BOOT_OPTS="$BOOT_OPTS -chardev socket,id=chrtpm,path=/dev/shm/tpm/swtpm-sock"
|
||||
BOOT_OPTS="$BOOT_OPTS -chardev socket,id=chrtpm,path=/run/swtpm-sock"
|
||||
BOOT_OPTS="$BOOT_OPTS -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0"
|
||||
BOOT_OPTS="$BOOT_OPTS -global kvm-pit.lost_tick_policy=discard -global ICH9-LPC.disable_s3=1"
|
||||
|
||||
mkdir -p /dev/shm/tpm
|
||||
chmod 755 /dev/shm/tpm
|
||||
swtpm socket -t -d --tpmstate dir=/dev/shm/tpm --ctrl type=unixio,path=/dev/shm/tpm/swtpm-sock --tpm2
|
||||
swtpm socket -t -d --tpmstate dir=/dev/shm/tpm --ctrl type=unixio,path=/run/swtpm-sock --tpm2
|
||||
|
||||
fi
|
||||
|
||||
|
|
|
@ -19,13 +19,13 @@ if [[ "${BOOT_MODE,,}" == "windows" ]]; then
|
|||
|
||||
for (( i = 0; i < 10; i++ )); do
|
||||
|
||||
[ -S "/dev/shm/tpm/swtpm-sock" ] && break
|
||||
[ -S "/run/swtpm-sock" ] && break
|
||||
echo "Waiting for TPM socket to become available..."
|
||||
sleep 1
|
||||
|
||||
done
|
||||
|
||||
if [ ! -S "/dev/shm/tpm/swtpm-sock" ]; then
|
||||
if [ ! -S "/run/swtpm-sock" ]; then
|
||||
error "TPM socket not found?" && exit 46
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue