[PATCH 20/20] openvz: stop hardcoding vzlist/vzctl/vzmigrate paths

Daniel P. Berrangé via Devel posted 20 patches 4 months, 1 week ago
[PATCH 20/20] openvz: stop hardcoding vzlist/vzctl/vzmigrate paths
Posted by Daniel P. Berrangé via Devel 4 months, 1 week ago
From: Daniel P. Berrangé <berrange@redhat.com>

Allow virCommand to find them in $PATH, which will always include 'sbin'
since the openvz driver only operates in system mode.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 src/openvz/openvz_conf.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/openvz/openvz_conf.h b/src/openvz/openvz_conf.h
index 9c3eff9aaf..83244ba60e 100644
--- a/src/openvz/openvz_conf.h
+++ b/src/openvz/openvz_conf.h
@@ -29,9 +29,9 @@
 
 
 /* OpenVZ commands - Replace with wrapper scripts later? */
-#define VZLIST         "/usr/sbin/vzlist"
-#define VZCTL          "/usr/sbin/vzctl"
-#define VZMIGRATE      "/usr/sbin/vzmigrate"
+#define VZLIST         "vzlist"
+#define VZCTL          "vzctl"
+#define VZMIGRATE      "vzmigrate"
 #define VZ_CONF_FILE   "/etc/vz/vz.conf"
 
 #define VZCTL_BRIDGE_MIN_VERSION ((3 * 1000 * 1000) + (0 * 1000) + 22 + 1)
-- 
2.49.0
Re: [PATCH 20/20] openvz: stop hardcoding vzlist/vzctl/vzmigrate paths
Posted by Peter Krempa via Devel 4 months, 1 week ago
On Tue, Apr 29, 2025 at 12:14:20 +0100, Daniel P. Berrangé via Devel wrote:
> From: Daniel P. Berrangé <berrange@redhat.com>
> 
> Allow virCommand to find them in $PATH, which will always include 'sbin'
> since the openvz driver only operates in system mode.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  src/openvz/openvz_conf.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Peter Krempa <pkrempa@redhat.com>