mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-24 21:53:40 +00:00
correctly encode boolean values in openvz configuration
This commit is contained in:
parent
f1a49f8b2b
commit
1ead9563a0
@ -794,7 +794,12 @@ sub create_config_line {
|
||||
my $text;
|
||||
|
||||
if (defined($data->{value})) {
|
||||
$text .= uc($key) . "=\"$data->{value}\"\n";
|
||||
if ($confdesc->{$key}->{type} eq 'boolean') {
|
||||
my $txt = $data->{value} ? 'yes' : 'no';
|
||||
$text .= uc($key) . "=\"$txt\"\n";
|
||||
} else {
|
||||
$text .= uc($key) . "=\"$data->{value}\"\n";
|
||||
}
|
||||
} elsif (defined($data->{bar})) {
|
||||
my $tmp = format_res_bar_lim($key, $data);
|
||||
$text .= uc($key) . "=\"$tmp\"\n";
|
||||
|
Loading…
Reference in New Issue
Block a user