[pve-devel] [PATCH container 3/4] vmstatus: make boolean value explicit

Fabian Ebner f.ebner at proxmox.com
Wed Mar 3 12:01:27 CET 2021


as otherwise the empty string is printed with 'pct status <id> --verbose' when
it's not a template.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 src/PVE/LXC.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index bae236b..23a7b06 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -235,7 +235,7 @@ sub vmstatus {
 	$d->{diskread} = 0;
 	$d->{diskwrite} = 0;
 
-	$d->{template} = PVE::LXC::Config->is_template($conf);
+	$d->{template} = PVE::LXC::Config->is_template($conf) ? 1 : 0;
 	$d->{lock} = $conf->{lock} if $conf->{lock};
     }
 
-- 
2.20.1






More information about the pve-devel mailing list