Commit 22f26281 authored by Dietmar Maurer's avatar Dietmar Maurer

correctly encode boolean values in openvz configuration

parent fadec7dd
......@@ -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";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment