From 6c03b0ae4cb527316209889582d51d73d5db2eb3 Mon Sep 17 00:00:00 2001 From: Fiona Ebner Date: Thu, 15 Dec 2022 09:13:25 +0100 Subject: [PATCH] d/postinst: check if datastore lockfile actually exists On an installation that never had any datastores, dkpg would fail to configure the package. Signed-off-by: Fiona Ebner --- debian/postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/postinst b/debian/postinst index 489cf6ac..0485ca34 100644 --- a/debian/postinst +++ b/debian/postinst @@ -48,7 +48,7 @@ case "$1" in true fi - if dpkg --compare-versions "$2" 'lt' '2.3.1~'; then + if dpkg --compare-versions "$2" 'lt' '2.3.1~' && test -e /etc/proxmox-backup/.datastore.lck; then lock_user="$(stat --format '%U' /etc/proxmox-backup/.datastore.lck)" if [ "${lock_user}" != "backup" ]; then echo "updating /etc/proxmox-backup/.datastore.lck from wrong user '${lock_user}' to 'backup'"