[pve-devel] [PATCH pve-manager v2 16/16] network-interface-pinning: early exit if nothing to do
Stefan Hanreich
s.hanreich at proxmox.com
Fri Jul 18 18:26:38 CEST 2025
We would regenerate all configuration files, even if no interface
would be mapped. While this shouldn't cause an issue, it's
unnecessary, has potential for creating bugs and leads to confusing
output for the users - so just abort in this case instead.
Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
---
PVE/CLI/proxmox_network_interface_pinning.pm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/PVE/CLI/proxmox_network_interface_pinning.pm b/PVE/CLI/proxmox_network_interface_pinning.pm
index 30815d3a1..b37bd28e0 100644
--- a/PVE/CLI/proxmox_network_interface_pinning.pm
+++ b/PVE/CLI/proxmox_network_interface_pinning.pm
@@ -381,6 +381,11 @@ __PACKAGE__->register_method({
$prefix,
);
+ if (!$mapping->%*) {
+ print "Nothing to do, aborting.\n";
+ exit 0;
+ }
+
for my $old_name (sort keys $mapping->%*) {
print "Name for link '$old_name' will change to '$mapping->{$old_name}'\n";
}
--
2.39.5
More information about the pve-devel
mailing list