]> git.proxmox.com Git - pve-common.git/commit
systemd: add wait_for_unit_removed
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 19 Jun 2019 07:21:23 +0000 (09:21 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 19 Jun 2019 10:05:57 +0000 (12:05 +0200)
commit721792f2cfa88f81975e97de585218d2e34179c0
tree6245b4f51f7c0e6ed539f380088e0d2373922da7
parenta2cd72115bc25b15f6f3ea9a87f2fbdab25b5280
systemd: add wait_for_unit_removed

And split out the common code into a systemd_call() sub.

This connects to the systemd bus and waits for a UnitRemoved
event to occur for the specified unit, with an optional
timeout.

We'll use this in qemu-server to wait for a VM's scope to
disappear completely before trying to start a VM's scope
anew.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
(cherry picked from commit b8d15bfd69ea6aa3ddcce9ffb496e3d52a509f31)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Systemd.pm