pending: fix typo in variable name

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2022-11-17 14:33:41 +01:00 committed by Thomas Lamprecht
parent e97bbbb64d
commit 7a24c98af6

View File

@ -5244,7 +5244,7 @@ sub vmconfig_apply_pending {
PVE::QemuConfig->cleanup_pending($conf); PVE::QemuConfig->cleanup_pending($conf);
my $generate_cloudnit = $skip_cloud_init ? 0 : undef; my $generate_cloudinit = $skip_cloud_init ? 0 : undef;
foreach my $opt (keys %{$conf->{pending}}) { # add/change foreach my $opt (keys %{$conf->{pending}}) { # add/change
next if $opt eq 'delete'; # just to be sure next if $opt eq 'delete'; # just to be sure
@ -5259,7 +5259,7 @@ sub vmconfig_apply_pending {
if (is_valid_drivename($opt)) { if (is_valid_drivename($opt)) {
my $drive = parse_drive($opt, $conf->{pending}->{$opt}); my $drive = parse_drive($opt, $conf->{pending}->{$opt});
$generate_cloudnit //= 1 if drive_is_cloudinit($drive); $generate_cloudinit //= 1 if drive_is_cloudinit($drive);
} }
$conf->{$opt} = delete $conf->{pending}->{$opt}; $conf->{$opt} = delete $conf->{pending}->{$opt};
@ -5268,7 +5268,7 @@ sub vmconfig_apply_pending {
# write all changes at once to avoid unnecessary i/o # write all changes at once to avoid unnecessary i/o
PVE::QemuConfig->write_config($vmid, $conf); PVE::QemuConfig->write_config($vmid, $conf);
if ($generate_cloudnit) { if ($generate_cloudinit) {
if (PVE::QemuServer::Cloudinit::apply_cloudinit_config($conf, $vmid)) { if (PVE::QemuServer::Cloudinit::apply_cloudinit_config($conf, $vmid)) {
# After successful generation and if there were changes to be applied, update the # After successful generation and if there were changes to be applied, update the
# config to drop the {cloudinit} entry. # config to drop the {cloudinit} entry.