Libcgroup should not mess up with systemd 'name=systemd' hierarchy. Let's
add ./configure option to ignore it on distros, which use it.
Only one hierarchy can be ignored, at least at this time, further
enhancement is possible.
Usage:
$ configure --enable-opaque-hierarchy="name=systemd"
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
], [])
AC_SUBST([pamlibdir],"$pam_module_dir")
+AC_ARG_ENABLE([opaque-hierarchy],
+ [AC_HELP_STRING([--enable-opaque-hierarchy=NAME],
+ [specify name of a hierarchy which libcgroup should ignore, e.g. name=systemd]
+ (default=none))],
+ [
+ if test "x$enableval" = xno -o "x$enableval" = xyes; then
+ AC_MSG_ERROR([Provide name of a hierarchy.])
+ else
+ AC_DEFINE_UNQUOTED([OPAQUE_HIERARCHY], "$enableval",
+ [Define to ignore specific hierarchy.])
+ fi
+ ], [])
+
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
* Check if it is a duplicate
*/
duplicate = 0;
+
+#ifdef OPAQUE_HIERARCHY
+ /*
+ * Ignore the opaque hierarchy.
+ */
+ if (strcmp(mntopt, OPAQUE_HIERARCHY) == 0)
+ continue;
+#endif
+
for (j = 0; j < found_mnt; j++) {
if (strncmp(mntopt, cg_mount_table[j].name,
FILENAME_MAX) == 0) {