Skip to contentSkip to conversation

LVM2 ./WHATS_NEW ./configure ./configure.in da ...

PATCH [email protected] 1 participant 1 message Jun 3, 2010

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2010-06-03 13:50:27

Modified files:

	.              : WHATS_NEW configure configure.in 
	daemons/clvmd  : clvmd-command.c lvm-functions.c 
	lib/misc       : configure.h.in 

Log message:
Use absolute paths in commands

clvmd restart does not work at all if clvmd binary is not in current dir.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1604&r2=1.1605
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/configure.diff?cvsroot=lvm2&r1=1.130&r2=1.131
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/configure.in.diff?cvsroot=lvm2&r1=1.141&r2=1.142
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd-command.c.diff?cvsroot=lvm2&r1=1.34&r2=1.35
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/lvm-functions.c.diff?cvsroot=lvm2&r1=1.89&r2=1.90
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/configure.h.in.diff?cvsroot=lvm2&r1=1.22&r2=1.23

WHATS_NEW +1 -0
@@ -1,5 +1,6 @@
 Version 2.02.67 -
 ===============================
+  Use absolute paths for clvmd restart.
   Require partial option in lvchange --refresh for partial LVs.
   Do not fail lvm_init() if init_logging() or _init_rand() generates an errno.
   Don't merge unchanged persistent cache file before dumping if tool scanned.
configure +93 -42

380 lines not on this page · raw message

configure.in +8 -0
@@ -1009,6 +1009,14 @@
 	AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["$MODPROBE_CMD"], [The path to 'modprobe', if available.])
 fi
 
+AC_DEFINE_UNQUOTED(LVM_PATH, ["$exec_prefix/sbin/lvm"], [Path to lvm binary.])
+
+if  test "$CLVMD" != none; then
+        clvmd_prefix=$ac_default_prefix
+        test "$prefix" != NONE && clvmd_prefix=$prefix
+	AC_DEFINE_UNQUOTED(CLVMD_PATH, ["$clvmd_prefix/sbin/clvmd"], [Path to clvmd binary.])
+fi
+
 ################################################################################
 dnl -- dmeventd pidfile and executable path
 AH_TEMPLATE(DMEVENTD_PIDFILE, [Path to dmeventd pidfile.])
daemons/clvmd/clvmd-command.c +1 -1
@@ -400,7 +400,7 @@
 
 	/* Exec new clvmd */
 	/* NOTE: This will fail when downgrading! */
-	execve("clvmd", argv, NULL);
+	execve(CLVMD_PATH, argv, NULL);
 
 	/* We failed */
 	return 0;
daemons/clvmd/lvm-functions.c +2 -2
@@ -653,7 +653,7 @@
 	char line[255];
 	FILE *vgs =
 	    popen
-	    ("lvm pvs  --config 'log{command_names=0 prefix=\"\"}' --nolocking --noheadings -o vg_name", "r");
+	    (LVM_PATH " pvs  --config 'log{command_names=0 prefix=\"\"}' --nolocking --noheadings -o vg_name", "r");
 
 	sync_unlock("P_" VG_ORPHANS, LCK_EXCL);
 	sync_unlock("P_" VG_GLOBAL, LCK_EXCL);
@@ -762,7 +762,7 @@
 	char line[255];
 	FILE *lvs =
 	    popen
-	    ("lvm lvs  --config 'log{command_names=0 prefix=\"\"}' --nolocking --noheadings -o vg_uuid,lv_uuid,lv_attr,vg_attr",
+	    (LVM_PATH " lvs  --config 'log{command_names=0 prefix=\"\"}' --nolocking --noheadings -o vg_uuid,lv_uuid,lv_attr,vg_attr",
 	     "r");
 
 	if (!lvs)
lib/misc/configure.h.in +6 -0
@@ -6,6 +6,9 @@
 /* Define to 1 to include built-in support for clustered LVM locking. */
 #undef CLUSTER_LOCKING_INTERNAL
 
+/* Path to clvmd binary. */
+#undef CLVMD_PATH
+
 /* Path to cmirrord pidfile. */
 #undef CMIRRORD_PIDFILE
 
@@ -397,6 +400,9 @@
 /* Define to 1 to include built-in support for LVM1 metadata. */
 #undef LVM1_INTERNAL
 
+/* Path to lvm binary. */
+#undef LVM_PATH
+
 /* Define to 1 to include built-in support for mirrors. */
 #undef MIRRORED_INTERNAL