Commit Graph

4 Commits

Author SHA1 Message Date
Stoiko Ivanov
e65624a3fa Systemd: add helpers for parsing unit files
taken from pve-storage/PVE/API2/Disks/Directory.pm (and made available as
public sub)

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2020-10-30 09:26:02 +01:00
Thomas Lamprecht
b4f88e889f systemd: add un-/escape_unit helpers
moved from pve-storage, we need to reuse it in another module there,
as it's a general method lets just move it here already.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-31 13:45:56 +01:00
Wolfgang Bumiller
b8d15bfd69 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>
2019-06-19 10:11:03 +02:00
Thomas Lamprecht
eae436871c rename splitted out systemd module to 'Systemd'
see:
https://www.freedesktop.org/wiki/Software/systemd/#spelling

We keep the initial upercase 'S' as it's standard for perl module
and perl critic complains otherwise.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2018-06-15 12:06:42 +02:00