From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH manager 5/7] network-interface-pinning: avoid warning if `bond-primary` is unset
Date: Tue, 23 Jun 2026 11:43:22 +0200 [thread overview]
Message-ID: <20260623094419.330174-6-c.heiss@proxmox.com> (raw)
In-Reply-To: <20260623094419.330174-1-c.heiss@proxmox.com>
Results in warnings such as
Use of uninitialized value $iface_name in pattern match (m//) at ..
Use of uninitialized value $iface_name in hash element at ..
`bond-primary` is an optional property and thus may be unset.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
PVE/CLI/pve_network_interface_pinning.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/PVE/CLI/pve_network_interface_pinning.pm b/PVE/CLI/pve_network_interface_pinning.pm
index 9dff181dc..19e358cd9 100644
--- a/PVE/CLI/pve_network_interface_pinning.pm
+++ b/PVE/CLI/pve_network_interface_pinning.pm
@@ -95,7 +95,8 @@ my sub update_etc_network_interfaces {
$iface_name = $mapping->name($iface_name);
$iface->{'vlan-raw-device'} = $mapping->name($iface->{'vlan-raw-device'});
} elsif ($iface->{type} eq 'bond') {
- $iface->{'bond-primary'} = $mapping->name($iface->{'bond-primary'});
+ $iface->{'bond-primary'} = $mapping->name($iface->{'bond-primary'})
+ if defined($iface->{'bond-primary'});
$iface->{slaves} = $mapping->list($iface->{slaves});
} elsif ($iface->{type} eq 'bridge') {
$iface->{bridge_ports} = $mapping->list($iface->{bridge_ports});
--
2.54.0
next prev parent reply other threads:[~2026-06-23 9:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 9:43 [PATCH docs/manager 0/7] interface-pinning: add rename subcommand and man(1) page Christoph Heiss
2026-06-23 9:43 ` [PATCH docs 1/7] network: fix typo occurences -> occurrences Christoph Heiss
2026-06-23 9:43 ` [PATCH docs 2/7] pve-doc-generator: handle CLI tools/services with dashes in their name Christoph Heiss
2026-06-23 9:43 ` [PATCH docs 3/7] pve-network-interface-pinning: init man(1) page Christoph Heiss
2026-06-23 9:43 ` [PATCH docs 4/7] network: pinning: mention how to rename an interface Christoph Heiss
2026-06-23 9:43 ` Christoph Heiss [this message]
2026-06-23 9:43 ` [PATCH manager 6/7] network-interface-pinning: add method for renaming existing pins Christoph Heiss
2026-06-23 9:43 ` [PATCH manager 7/7] network-interface-pinning: generate proper manpage from docs Christoph Heiss
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260623094419.330174-6-c.heiss@proxmox.com \
--to=c.heiss@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.