[pve-devel] [PATCH] Fix interface writer for bridge_ports and slaves.

Wolfgang Link w.link at proxmox.com
Fri Jan 27 13:14:15 CET 2017


The pve-iface-list allow to separate interfaces with [;| |,].
But in the interface file are only whitespace allowed to separate interfaces.
---
 src/PVE/INotify.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/PVE/INotify.pm b/src/PVE/INotify.pm
index 621b555..d0c22ef 100644
--- a/src/PVE/INotify.pm
+++ b/src/PVE/INotify.pm
@@ -1054,6 +1054,7 @@ sub __interface_to_string {
 	# not printing out options
     } elsif ($d->{type} eq 'bridge') {
 
+	$d->{bridge_ports} =~ s/([;|,| ])+/ /g;
 	my $ports = $d->{bridge_ports} || 'none';
 	$raw .= "\tbridge_ports $ports\n";
 	$done->{bridge_ports} = 1;
@@ -1073,6 +1074,7 @@ sub __interface_to_string {
     
     } elsif ($d->{type} eq 'bond') {
 
+	$d->{slaves} =~ s/([;|,| ])+/ /g;
 	my $slaves = $d->{slaves} || 'none';
 	$raw .= "\tslaves $slaves\n";
 	$done->{slaves} = 1;
-- 
2.1.4




More information about the pve-devel mailing list