fixed template detection command with awk escaping

This commit is contained in:
Mathieu Broillet 2023-06-13 08:09:48 +02:00
parent fa3b0b1b27
commit 9ec4eb2382
No known key found for this signature in database
GPG Key ID: 7D4F25BC50A0AA32

View File

@ -95,7 +95,7 @@ class LXC:
# TODO: might have to run "pveam update" before running this command on fresh install of PVE # TODO: might have to run "pveam update" before running this command on fresh install of PVE
template_name = proxmox_utils.run_command_on_pve( template_name = proxmox_utils.run_command_on_pve(
f"pveam available --section system | awk /'{self.os_name}-{self.os_release}/' | awk '{{print \\$2}}'") f"pveam available --section system | awk /\'{self.os_name}-{self.os_release}/\' | awk \'{{print $2}}\'")
is_template_downloaded = proxmox_utils.run_command_on_pve(command=f"pveam list local | awk /'{template_name}/'") is_template_downloaded = proxmox_utils.run_command_on_pve(command=f"pveam list local | awk /'{template_name}/'")