summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.h.in3
-rw-r--r--configure.in14
-rw-r--r--include/libcgroup.h2
3 files changed, 17 insertions, 2 deletions
diff --git a/config.h.in b/config.h.in
index 12d2fdd..f2b4278 100644
--- a/config.h.in
+++ b/config.h.in
@@ -3,6 +3,9 @@
/* Define to enable extra debugging output. */
#undef CGROUP_DEBUG
+/* Cgrulesengd socket path */
+#undef CGRULE_CGRED_SOCKET_PATH
+
/* Define to 1 if your system has a working `chown' function. */
#undef HAVE_CHOWN
diff --git a/configure.in b/configure.in
index d6b28d3..8e2a40a 100644
--- a/configure.in
+++ b/configure.in
@@ -76,6 +76,20 @@ AC_ARG_ENABLE([daemon],
[with_daemon=true])
AM_CONDITIONAL([WITH_DAEMON], [test x$with_daemon = xtrue])
+socket_path="/var/run/cgred.socket"
+AC_ARG_ENABLE([cgred-socket],
+ [AC_HELP_STRING([--enable-cgred-socket=PATH],
+ specify location of cgrulesengd communication socket
+ (default=/var/run/cgred.socket))],
+ [
+ if test "x$enableval" = xno -o "x$enableval" = xyes; then
+ AC_MSG_ERROR([Provide valid path with --enable-cgred-socket option.])
+ else
+ socket_path="$enableval"
+ fi
+ ], [])
+AC_DEFINE_UNQUOTED([CGRULE_CGRED_SOCKET_PATH],"$socket_path", [Cgrulesengd socket path])
+
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
diff --git a/include/libcgroup.h b/include/libcgroup.h
index 8a86cb7..3d5660c 100644
--- a/include/libcgroup.h
+++ b/include/libcgroup.h
@@ -52,8 +52,6 @@ __BEGIN_DECLS
#define CGRULE_INVALID (-1)
#define CGRULE_WILD (-2)
-/* FIXME: Change the temporary file to configurable one. */
-#define CGRULE_CGRED_SOCKET_PATH "/tmp/cgred"
#define CGRULE_SUCCESS_STORE_PID "SUCCESS_STORE_PID"
/* Flags for cgroup_change_cgroup_uid_gid() */