With systemd/systemd#9796 [1], included in systemd v240 and later [2],
we will be able to use `systemctl is-system-running --wait` to wait for
the system being online instead of polling systemd’s private socket,
which should be both more efficient and more stable.
[1]: https://github.com/systemd/systemd/pull/9796
[2]: https://github.com/systemd/systemd/blob/v240/NEWS#L189-L191
Change-Id: I6bc2bb691eb1a6bdbcd98843891d06fb49e6b4df
} -> exec {"lxc-$contname-started":
path => '/usr/bin',
refreshonly => true,
+ # TODO use `systemctl is-system-running --wait` in systemd v240+
refresh => "/usr/bin/lxc-stop -n $contname ; /usr/bin/lxc-start -dn $contname; /usr/bin/lxc-attach -n $contname -- bash -c 'while ! [[ -S /run/systemd/private ]]; do sleep 1; done'",
}-> exec {"lxc-$contname-started1":
command => "/usr/bin/lxc-start -dn $contname; /usr/bin/lxc-attach -n $contname -- bash -c 'while ! [[ -S /run/systemd/private ]]; do sleep 1; done'",