]> git.proxmox.com Git - qemu-server.git/commitdiff
cloudinit: use normal grep
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 19 Oct 2020 13:32:03 +0000 (15:32 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 19 Oct 2020 13:32:03 +0000 (15:32 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/QemuServer/Cloudinit.pm

index 8b8ffd48b156b4524759e3fe38266115757299d3..52a4203dff9b9506feca0383e13ff69297f404ba 100644 (file)
@@ -171,7 +171,7 @@ sub configdrive2_network {
        $content .= "        dns_search $searchdomains\n";
     }
 
-    my @ifaces = grep(/^net(\d+)$/, keys %$conf);
+    my @ifaces = grep { /^net(\d+)$/ } keys %$conf;
     foreach my $iface (sort @ifaces) {
        (my $id = $iface) =~ s/^net//;
        next if !$conf->{"ipconfig$id"};
@@ -251,7 +251,7 @@ sub nocloud_network_v2 {
 
     my $dns_done;
 
-    my @ifaces = grep(/^net(\d+)$/, keys %$conf);
+    my @ifaces = grep { /^net(\d+)$/ } keys %$conf;
     foreach my $iface (sort @ifaces) {
        (my $id = $iface) =~ s/^net//;
        next if !$conf->{"ipconfig$id"};
@@ -322,7 +322,7 @@ sub nocloud_network {
     my $content = "version: 1\n"
                 . "config:\n";
 
-    my @ifaces = grep(/^net(\d+)$/, keys %$conf);
+    my @ifaces = grep { /^net(\d+)$/ } keys %$conf;
     foreach my $iface (sort @ifaces) {
        (my $id = $iface) =~ s/^net//;
        next if !$conf->{"ipconfig$id"};