mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-08-23 03:48:35 +00:00
virtual_environment_datastores.go: Update remote command to get datasource path (#49)
This commit fixes the shell command that is being executed to get the datasource path which appears to be no longer functional. The previous command assumed that "path" is going to be the next line after the datasource name, leaving NFS mounts and other types of mount points non-functional.
This commit is contained in:
parent
75e01de8f3
commit
065e859227
@ -167,7 +167,7 @@ func (c *VirtualEnvironmentClient) UploadFileToDatastore(d *VirtualEnvironmentDa
|
||||
}
|
||||
|
||||
buf, err := sshSession.CombinedOutput(
|
||||
fmt.Sprintf(`grep -Pzo ': %s\s+path\s+[^\s]+' /etc/pve/storage.cfg | grep -Pzo '/[^\s]*' | tr -d '\000'`, d.DatastoreID),
|
||||
fmt.Sprintf(`awk "/.+: %s$/,/^$/" /etc/pve/storage.cfg | grep -oP '(?<=path[ ])[^\s]+' | head -c -1`, d.DatastoreID),
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user