public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: master - build: remove last hardencoded bits for /var/run
@ 2009-05-29 19:06 Fabio M. Di Nitto
  0 siblings, 0 replies; only message in thread
From: Fabio M. Di Nitto @ 2009-05-29 19:06 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=5c0fbc4d1d49ea92906c501a4e9eccd171d0f598
Commit:        5c0fbc4d1d49ea92906c501a4e9eccd171d0f598
Parent:        3f1073b74b4972c63155323f6a94fbfcd91f98c8
Author:        Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate:    Fri May 29 21:05:14 2009 +0200
Committer:     Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Fri May 29 21:05:14 2009 +0200

build: remove last hardencoded bits for /var/run

this also changes the default for our daemons to store their
pid files in /var/run/cluster.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
 cman/notifyd/main.c      |    2 +-
 cman/qdisk/daemon_init.c |    2 +-
 cman/tests/sysman.c      |    2 +-
 cman/tests/sysmand.c     |    2 +-
 configure.ac             |    2 ++
 5 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/cman/notifyd/main.c b/cman/notifyd/main.c
index feaebb9..9795205 100644
--- a/cman/notifyd/main.c
+++ b/cman/notifyd/main.c
@@ -26,7 +26,7 @@ int daemon_quit = 0;
 cman_handle_t cman_handle;
 int rr = 0;
 
-#define LOCKFILE_NAME	"/var/run/cmannotifyd.pid"
+#define LOCKFILE_NAME	CLUSTERVARRUN "/cmannotifyd.pid"
 
 #define OPTION_STRING "hdfVr"
 
diff --git a/cman/qdisk/daemon_init.c b/cman/qdisk/daemon_init.c
index 46c2f7f..7b34db6 100644
--- a/cman/qdisk/daemon_init.c
+++ b/cman/qdisk/daemon_init.c
@@ -120,7 +120,7 @@ check_process_running(char *prog, pid_t * pid)
 	memset(filename, 0, PATH_MAX);
 
 	cmd = basename(prog);
-	snprintf(filename, sizeof (filename), "/var/run/%s.pid", cmd);
+	snprintf(filename, sizeof (filename), CLUSTERVARRUN "/%s.pid", cmd);
 
 	ret = stat(filename, &st);
 	if ((ret < 0) || (!st.st_size))
diff --git a/cman/tests/sysman.c b/cman/tests/sysman.c
index afa8e8b..fac803b 100644
--- a/cman/tests/sysman.c
+++ b/cman/tests/sysman.c
@@ -17,7 +17,7 @@
 #include <fcntl.h>
 #include <limits.h>
 
-#define LOCAL_SOCKNAME "/var/run/sysman"
+#define LOCAL_SOCKNAME CLUSTERVARRUN "/sysman"
 static int open_local_sock(void);
 
 int main(int argc, char *argv[])
diff --git a/cman/tests/sysmand.c b/cman/tests/sysmand.c
index 112526d..70576d9 100644
--- a/cman/tests/sysmand.c
+++ b/cman/tests/sysmand.c
@@ -33,7 +33,7 @@
 #include <limits.h>
 
 #include "libcman.h"
-#define LOCAL_SOCKNAME "/var/run/sysman"
+#define LOCAL_SOCKNAME CLUSTERVARRUN "/sysman"
 #define CLUSTER_PORT_SYSMAN 12
 
 static cman_node_t *nodes = NULL;
diff --git a/configure.ac b/configure.ac
index 1710108..845883b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -185,6 +185,8 @@ AC_SUBST([NOTIFYDDIR])
 AC_SUBST([LOGROTATEDIR])
 
 AC_SUBST([CLUSTERVARRUN])
+AC_DEFINE_UNQUOTED([CLUSTERVARRUN], "$(eval echo ${CLUSTERVARRUN)",
+		   [Default cluster var/run directory])
 
 AC_SUBST([CLUSTERVARLIB])
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-05-29 19:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-29 19:06 cluster: master - build: remove last hardencoded bits for /var/run Fabio M. Di Nitto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).