Dne 12.10.2015 v 09:09 Hannes Reinecke napsal(a):
On 10/08/2015 09:44 PM, Benjamin Marzinski wrote:
While there are other ways to decide whether to use /run or /var/run,
I believe this should be good enough, and it uses a Makefile define
that already exists. If it doesn't work for everyone, I'll switch it
to actually test the directories and add a new define to CFLAGS.
Signed-off-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx>
---
libmultipath/defaults.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h
index e2d2779..a313d75 100644
--- a/libmultipath/defaults.h
+++ b/libmultipath/defaults.h
@@ -27,7 +27,11 @@
#define MAX_CHECKINT(a) (a << 2)
#define MAX_DEV_LOSS_TMO 0x7FFFFFFF
+#ifdef USE_SYSTEMD
#define DEFAULT_PIDFILE "/run/multipathd.pid"
+#else
+#define DEFAULT_PIDFILE "/var/run/multipathd.pid"
+#endif
#define DEFAULT_CONFIGFILE "/etc/multipath.conf"
#define DEFAULT_BINDINGS_FILE "/etc/multipath/bindings"
#define DEFAULT_WWIDS_FILE "/etc/multipath/wwids"
Hmpf. Again.
But yeah, I guess it's okay.
If only systemd would stop moving things around ...
I assume things like this should be detected at configure time and
used via 'AC_DEFINE()' m4 macro.
(Check i.e. lvm2 configure.in file)
(As user may wish to even use completely different directory, to
make a parallel usable binary)
Zdenek
--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel