remove absolute paths when executing binaries

we set the paths manually, so this is ok

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2020-06-15 11:16:11 +02:00
committed by Dietmar Maurer
parent 0b99e5aebc
commit cbef49bf4f
9 changed files with 20 additions and 28 deletions

View File

@ -20,7 +20,7 @@ pub fn get_lvm_devices(
partition_type_map: &HashMap<String, Vec<String>>,
) -> Result<HashSet<u64>, Error> {
const PVS_BIN_PATH: &str = "/sbin/pvs";
const PVS_BIN_PATH: &str = "pvs";
let mut command = std::process::Command::new(PVS_BIN_PATH);
command.args(&["--reportformat", "json", "--noheadings", "--readonly", "-o", "pv_name"]);

View File

@ -76,7 +76,7 @@ pub fn get_smart_data(
health_only: bool,
) -> Result<SmartData, Error> {
const SMARTCTL_BIN_PATH: &str = "/usr/sbin/smartctl";
const SMARTCTL_BIN_PATH: &str = "smartctl";
let mut command = std::process::Command::new(SMARTCTL_BIN_PATH);
command.arg("-H");