0

I have a script that contains the following:

sudo machinectl start "$machinename"
sudo systemd-run -PM root@"$machinename" "$command"
Failed to connect to bus: No such file or directory
Failed to start transient service unit: Transport endpoint is not connected

This fails because the first line only starts booting the container; the second line runs before the container finishes booting. How do I wait for the container to finish booting?

4

0 回答 0