mirror of
https://github.com/AlbrechtL/openwrt-docker.git
synced 2026-10-15 08:01:26 +00:00
fix: Move socket to /run (#375)
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user