[pve-devel] [PATCH pve-manager v2 04/16] firewall on-boot commit: report errors if rename fails
Stefan Hanreich
s.hanreich at proxmox.com
Fri Jul 18 18:26:26 CEST 2025
From: Thomas Lamprecht <t.lamprecht at proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
---
bin/pve-firewall-commit | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/bin/pve-firewall-commit b/bin/pve-firewall-commit
index ebcf9812d..e0d4eb410 100644
--- a/bin/pve-firewall-commit
+++ b/bin/pve-firewall-commit
@@ -9,6 +9,9 @@ my $local_node = PVE::INotify::nodename();
my $current_fw_config_file = "/etc/pve/nodes/$local_node/host.fw";
my $new_fw_config_file = "/etc/pve/nodes/$local_node/host.fw.new";
-rename($new_fw_config_file, $current_fw_config_file) if -e $new_fw_config_file;
+if (-e $new_fw_config_file) {
+ rename($new_fw_config_file, $current_fw_config_file)
+ or die "failed to commit new local node firewall config '$new_fw_config_file' - $!\n";
+}
exit 0;
--
2.39.5
More information about the pve-devel
mailing list