diff --git a/tools/Makefile.in b/tools/Makefile.in index 9bbf87b5b..cec74a9e7 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -114,8 +114,6 @@ LVMLIBS += -ldevmapper EXPORTED_HEADER = $(srcdir)/lvm2cmd.h EXPORTED_FN_PREFIX = lvm2 -DEFS += -DLVM_SHARED_PATH=\"$(exec_prefix)/sbin/lvm\" - CFLOW_LIST = lvmcmdlib.c lvm2cmd.c CFLOW_LIST_TARGET = liblvm2cmd.cflow CFLOW_TARGET = lvm diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c index 78974df0e..29fffb311 100644 --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c @@ -1925,12 +1925,12 @@ int lvm2_main(int argc, char **argv) return -1; if (is_static() && strcmp(base, "lvm.static") && - path_exists(LVM_SHARED_PATH) && + path_exists(LVM_PATH) && !getenv("LVM_DID_EXEC")) { if (setenv("LVM_DID_EXEC", base, 1)) log_sys_error("setenv", "LVM_DID_EXEC"); - if (execvp(LVM_SHARED_PATH, argv) == -1) - log_sys_error("execvp", "LVM_SHARED_PATH"); + if (execvp(LVM_PATH, argv) == -1) + log_sys_error("execvp", LVM_PATH); if (unsetenv("LVM_DID_EXEC")) log_sys_error("unsetenv", "LVM_DID_EXEC"); }