]> git.proxmox.com Git - qemu-server.git/commit - PVE/QemuServer.pm
swtpm: wait for pidfile
authorStefan Reiter <s.reiter@proxmox.com>
Thu, 14 Oct 2021 09:28:49 +0000 (11:28 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 18 Oct 2021 07:43:46 +0000 (09:43 +0200)
commitf85951dc82004040d877c5651ef81762f53e29eb
tree926f02fa56c62f49e63111975a101fd14e4e35cd
parent9d83932d7cf5e006d87f654aee7013c172420704
swtpm: wait for pidfile

swtpm may take a little bit to daemonize, so the pidfile might not be
available right after run_command. Causes an ugly warning about using an
undefined value in a match, so wait up to 5s for it to appear.

Note that in testing this loop only ever got to the first or second
iteration, so I believe the timeout duration should be more than enough.

Also add a missing 'usleep' import, 'usleep' was used before but never
imported, apparently the other case never got triggered...

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
PVE/QemuServer.pm