Ignore systemd hierarchy - it's now invisible to libcgroup

Resolves: #627378
This commit is contained in:
Jan Safranek 2010-11-12 09:22:30 +01:00
parent 40fdc431f6
commit 2ec2fb4937
2 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,24 @@
Ignore systemd hierarchy. Quick&dirity fix for bug #627378
Author: Dhaval Giani <dhaval.bugzilla@thegianis.in>
@@ -, +, @@
src/api.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- libcgroup-0.36.2/src/api.c
+++ libcgroup-0.36.2/src/api.c
@@ -772,6 +772,14 @@ int cgroup_init(void)
* Check if it is a duplicate
*/
duplicate = 0;
+
+ /*
+ * Ignore anything to do with systemd
+ */
+ if (strncmp(mntopt, "name=systemd",
+ strlen("name=systemd")) == 0)
+ continue;
+
for (j = 0; j < found_mnt; j++) {
if (strncmp(mntopt, cg_mount_table[j].name,
FILENAME_MAX) == 0) {

View File

@ -5,7 +5,7 @@ Name: libcgroup
Summary: Tools and libraries to control and monitor control groups
Group: Development/Libraries
Version: 0.36.2
Release: 2%{?dist}
Release: 3%{?dist}
License: LGPLv2+
URL: http://libcg.sourceforge.net/
Source0: http://downloads.sourceforge.net/libcg/%{name}-%{version}.tar.bz2
@ -13,6 +13,7 @@ Source1: README.Fedora
Patch1: fedora-config.patch
Patch2: fedora-fix-initscripts.patch
Patch3: libcgroup-0.36.2-initscripts.patch
Patch4: libcgroup-0.36.2-systemd.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pam-devel
BuildRequires: byacc
@ -49,6 +50,7 @@ provide scripts to manage that configuration.
%patch1 -p1 -b .config
%patch2 -p1 -b .lsb
%patch3 -p1 -b .running
%patch4 -p1 -b .systemd
%build
%configure --bindir=/bin --sbindir=/sbin --libdir=%{_libdir} --enable-initscript-install --enable-pam-module-dir=/%{_lib}/security
@ -143,6 +145,9 @@ fi
%doc COPYING INSTALL
%changelog
* Fri Nov 12 2010 Jan Safranek <jsafrane@redhat.com> 0.36.2-3
- Ignore systemd hierarchy - it's now invisible to libcgroup (#627378)
* Mon Aug 2 2010 Jan Safranek <jsafrane@redhat.com> 0.36.2-2
- Fix initscripts to report stopped cgconfig service as not running
(#619091)