mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-15 05:06:18 +00:00
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:
parent
20e0336de5
commit
e8f4a4c606
@ -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
|
||||
|
@ -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 (
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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 \
|
||||
|
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user