]> git.proxmox.com Git - pve-container.git/commitdiff
vmstatus: make template property optional
authorFabian Ebner <f.ebner@proxmox.com>
Thu, 11 Mar 2021 10:26:48 +0000 (11:26 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 26 May 2021 15:41:17 +0000 (17:41 +0200)
to avoid printing 'template: ' with 'pct status <id> --verbose' if it's false.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
src/PVE/LXC.pm

index 7e6f3784712b4667ec8da9a5df068ffb12d0a398..bb1cbdbd18fd507669d7b4786b9b5e7ce4f99983 100644 (file)
@@ -234,7 +234,7 @@ sub vmstatus {
        $d->{diskread} = 0;
        $d->{diskwrite} = 0;
 
-       $d->{template} = PVE::LXC::Config->is_template($conf);
+       $d->{template} = 1 if PVE::LXC::Config->is_template($conf);
        $d->{lock} = $conf->{lock} if $conf->{lock};
     }