1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

makefiles: drop LVM_SHARED_PATH

We already have LVM_PATH define used everywhere else
to access LVM binary so stay with one name.
This commit is contained in:
Zdenek Kabelac 2015-05-18 12:16:24 +02:00
parent 30c3bbcd9e
commit 62ac80c8fa
2 changed files with 3 additions and 5 deletions

View File

@ -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

View File

@ -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");
}