remove hardcoded /var and use localstatedir

instead.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1854 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
Fabio M. Di Nitto 2009-03-17 09:53:39 +00:00
parent 20e0336de5
commit e8f4a4c606
10 changed files with 11 additions and 11 deletions

View File

@ -32,7 +32,7 @@
MAINTAINERCLEANFILES = Makefile.in
AM_CFLAGS = -fPIC
AM_CPPFLAGS = -DSYSCONFDIR=\"${sysconfdir}\" -DLCRSODIR=\"${LCRSODIR}\"
AM_CPPFLAGS = -DSYSCONFDIR=\"${sysconfdir}\" -DLCRSODIR=\"${LCRSODIR}\" -DLOCALSTATEDIR=\"${localstatedir}\"
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
LCR_SRC = objdb.c vsf_ykd.c coroparse.c quorum.c vsf_quorum.c

View File

@ -689,7 +689,7 @@ static int conn_info_create (int fd)
#if defined(COROSYNC_LINUX)
const char *socketname = "libais.socket";
#else
const char *socketname = "/var/run/libais.socket";
const char *socketname = LOCALSTATEDIR "/run/libais.socket";
#endif
static int poll_handler_accept (

View File

@ -169,7 +169,7 @@ static void sigsegv_handler (int num)
{
(void)signal (SIGSEGV, SIG_DFL);
logsys_atsegv();
logsys_log_rec_store ("/var/lib/corosync/fdata");
logsys_log_rec_store (LOCALSTATEDIR "/lib/corosync/fdata");
raise (SIGSEGV);
}
@ -177,7 +177,7 @@ static void sigabrt_handler (int num)
{
(void)signal (SIGABRT, SIG_DFL);
logsys_atsegv();
logsys_log_rec_store ("/var/lib/corosync/fdata");
logsys_log_rec_store (LOCALSTATEDIR "/lib/corosync/fdata");
raise (SIGABRT);
}

View File

@ -718,7 +718,7 @@ int totemsrp_initialize (
rundir = getenv ("COROSYNC_RUN_DIR");
if (rundir == NULL) {
rundir = "/var/lib/corosync";
rundir = LOCALSTATEDIR "/lib/corosync";
}
res = mkdir (rundir, 0700);

View File

@ -31,7 +31,7 @@
MAINTAINERCLEANFILES = Makefile.in
AM_CFLAGS = -fPIC
AM_CPPFLAGS = -DLCRSODIR=\"${LCRSODIR}\"
AM_CPPFLAGS = -DLCRSODIR=\"${LCRSODIR}\" -DLOCALSTATEDIR=\"${localstatedir}\"
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
LCRSO = libtest_a.lcrso libtest_b.lcrso

View File

@ -59,7 +59,7 @@
#ifdef COROSYNC_LINUX
static const char *socketname = "lcr.socket";
#else
static const char *socketname = "/var/run/lcr.socket";
static const char *socketname = LOCALSTATEDIR "/run/lcr.socket";
#endif
static int uic_connect (int *fd);

View File

@ -61,7 +61,7 @@
#ifdef COROSYNC_LINUX
static char *socketname = "lcr.socket";
#else
static char *socketname = "/var/run/lcr.socket";
static char *socketname = LOCALSTATEDIR "/run/lcr.socket";
#endif
static void uis_lcr_bind (int *server_fd)

View File

@ -93,7 +93,7 @@ static const char *socketname = "libais.socket";
#else
#define AIS_SUN_LEN(a) SUN_LEN(a)
static const char *socketname = "/var/run/libais.socket";
static const char *socketname = LOCALSTATEDIR "/run/libais.socket";
#endif
#ifdef SO_NOSIGPIPE

View File

@ -32,7 +32,7 @@
MAINTAINERCLEANFILES = Makefile.in
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include
AM_CPPFLAGS = -DSYSCONFDIR=\"${sysconfdir}\"
AM_CPPFLAGS = -DSYSCONFDIR=\"${sysconfdir}\" -DLOCALSTATEDIR=\"${localstatedir}\"
sbin_PROGRAMS = corosync-fplay corosync-cfgtool \
corosync-keygen corosync-objctl \

View File

@ -456,7 +456,7 @@ int main (void)
int size_read;
flt_data = malloc ((flt_data_size + 2) * sizeof (unsigned int));
fd = open ("/var/lib/corosync/fdata", O_RDONLY);
fd = open (LOCALSTATEDIR "/lib/corosync/fdata", O_RDONLY);
size_read = (int)read (fd, flt_data, (flt_data_size + 2) * sizeof (unsigned int));
if (size_read != (flt_data_size + 2) * sizeof (unsigned int)) {