From abbf6dedb9a9e01854aa80b7bb5c90552acce36f Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 1 Oct 2024 15:51:06 +0200 Subject: [PATCH] api: subscription update: report error if removing ceph-auth file fails Print a warning if the file could not deleted (if it was actually existed) Signed-off-by: Thomas Lamprecht --- PVE/API2/Subscription.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/API2/Subscription.pm b/PVE/API2/Subscription.pm index 693f1b97..0ffc30c6 100644 --- a/PVE/API2/Subscription.pm +++ b/PVE/API2/Subscription.pm @@ -94,7 +94,7 @@ sub write_etc_subscription { $filename, "/etc/apt/auth.conf.d/pve.conf", "enterprise.proxmox.com/debian/pve", $info); if (!(defined($info->{key}) && defined($info->{serverid}))) { - unlink "/etc/apt/auth.conf.d/ceph.conf"; + unlink "/etc/apt/auth.conf.d/ceph.conf" or $!{ENOENT} or die "failed to remove apt auth ceph.conf - $!"; } else { # FIXME: improve this, especially the selection of valid ceph-releases # NOTE: currently we should add future ceph releases as early as possible, to ensure that