mostly taken from debian-upstream Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
adapted from debian-upstream 0be5e4edc2eef9885fd03e9c797b9429da539ce2 Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>