mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-03 08:48:43 +00:00
cloudinit: use normal grep
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
50bbe37787
commit
6ef6d68f6c
@ -171,7 +171,7 @@ sub configdrive2_network {
|
|||||||
$content .= " dns_search $searchdomains\n";
|
$content .= " dns_search $searchdomains\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
my @ifaces = grep(/^net(\d+)$/, keys %$conf);
|
my @ifaces = grep { /^net(\d+)$/ } keys %$conf;
|
||||||
foreach my $iface (sort @ifaces) {
|
foreach my $iface (sort @ifaces) {
|
||||||
(my $id = $iface) =~ s/^net//;
|
(my $id = $iface) =~ s/^net//;
|
||||||
next if !$conf->{"ipconfig$id"};
|
next if !$conf->{"ipconfig$id"};
|
||||||
@ -251,7 +251,7 @@ sub nocloud_network_v2 {
|
|||||||
|
|
||||||
my $dns_done;
|
my $dns_done;
|
||||||
|
|
||||||
my @ifaces = grep(/^net(\d+)$/, keys %$conf);
|
my @ifaces = grep { /^net(\d+)$/ } keys %$conf;
|
||||||
foreach my $iface (sort @ifaces) {
|
foreach my $iface (sort @ifaces) {
|
||||||
(my $id = $iface) =~ s/^net//;
|
(my $id = $iface) =~ s/^net//;
|
||||||
next if !$conf->{"ipconfig$id"};
|
next if !$conf->{"ipconfig$id"};
|
||||||
@ -322,7 +322,7 @@ sub nocloud_network {
|
|||||||
my $content = "version: 1\n"
|
my $content = "version: 1\n"
|
||||||
. "config:\n";
|
. "config:\n";
|
||||||
|
|
||||||
my @ifaces = grep(/^net(\d+)$/, keys %$conf);
|
my @ifaces = grep { /^net(\d+)$/ } keys %$conf;
|
||||||
foreach my $iface (sort @ifaces) {
|
foreach my $iface (sort @ifaces) {
|
||||||
(my $id = $iface) =~ s/^net//;
|
(my $id = $iface) =~ s/^net//;
|
||||||
next if !$conf->{"ipconfig$id"};
|
next if !$conf->{"ipconfig$id"};
|
||||||
|
Loading…
Reference in New Issue
Block a user