]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
From: Ivana Varekova <varekova@redhat.com>
authorBalbir Singh <balbir@linux.vnet.ibm.com>
Mon, 23 Feb 2009 14:10:58 +0000 (14:10 +0000)
committerBalbir Singh <balbir@linux.vnet.ibm.com>
Mon, 23 Feb 2009 14:10:58 +0000 (14:10 +0000)
This patch changes cgconfig.conf - comment all rows and rename
example values - to have example which should be installed to /etc/.
Move cgred to /etc/sysconfig and patch spec to install all
/etc/* configuration files (at least they shows examples and
help to user to do their own configuration).).

Signed-off-by: Ivana Varekova <varekova@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
NOTE: The spec file is still broken due to lack of packaging of pam_cgroup.so.

git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@337 4f4bb910-9a46-0410-90c8-c897d4f1cd53

README_daemon
libcgroup.spec.in
samples/cgconfig.conf
samples/cgred.conf
scripts/init.d/cgred

index 1ff7a3399707f4f75695318d0d20ce487d09e0e5..b19181c22fc0670e0d7dcb878b51b89ffef69aeb 100644 (file)
@@ -54,7 +54,7 @@ was already started), and status (print whether the daemon is started or
 stopped) commands are also supported.  An additional command, "flash", allows
 you to reload the configuration file without stopping the daemon.
        /etc/init.d/cgred flash
-The cgred script automatically loads configuration from /etc/cgred.d/cgred.conf,
+The cgred script automatically loads configuration from /etc/sysconfig/cgred.conf,
 which is shipped as samples/cgred.conf.  See that file for more information.
 
 If you choose not to run the daemon as a service, the following options are
index 177c7c0893caa9ea12f46ed02d261c3b313e3e9f..f96b7844f564bca789cc92d75a82638f128fa36c 100644 (file)
@@ -40,7 +40,10 @@ make DESTDIR=$RPM_BUILD_ROOT install
 mkdir -p $RPM_BUILD_ROOT/%{_initrddir}
 cp scripts/init.d/cgconfig $RPM_BUILD_ROOT/%{_initrddir}/cgconfig
 cp scripts/init.d/cgred $RPM_BUILD_ROOT/%{_initrddir}/cgred
-
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig
+cp samples/cgred.conf $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cgred.conf
+cp samples/cgconfig.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgconfig.conf
+cp samples/cgrules.conf $RPM_BUILD_ROOT/%{_sysconfdir}/cgrules.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -63,6 +66,9 @@ rm -rf $RPM_BUILD_ROOT
 
 %files 
 %defattr(-,root,root,-)
+%config(noreplace) %{_sysconfdir}/sysconfig/cgred.conf
+%config(noreplace) %{_sysconfdir}/cgconfig.conf
+%config(noreplace) %{_sysconfdir}/cgrules.conf
 %{_libdir}/libcgroup-%{version}.so
 %{_libdir}/libcgroup.so.*
 %{_bindir}/cgexec
index 782f72444f300f94032d0c7e4a4201afe303861d..de77e4b8c4862bbe794effbf7475f8c0d213cf44 100644 (file)
 #  WITHOUT ANY WARRANTY; without even the implied warranty of
 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 #
-# controller   file
+#group daemons/www {
+#      perm {
+#              task {
+#                      uid = root;
+#                      gid = webmaster;
+#              }
+#              admin {
+#                      uid = root;
+#                      gid = root;
+#              }
+#      }
+#      cpu {
+#              cpu.shares = 1000;
+#      }
+#}
 #
-
-group ca1 {
-       perm {
-               task {
-                       uid = root;
-                       gid = root;
-               }
-               admin {
-                       uid = root;
-                       gid = root;
-               }
-       }
-
-       cpu {
-               cpu.shares = 500;
-       }
-
-}
-
-group db {
-       perm {
-               task {
-                       uid = balbir;
-                       gid = balbir;
-               }
-               admin {
-                       uid = balbir;
-                       gid = balbir;
-               }
-       }
-
-       cpu {
-               cpu.shares = 500;
-       }
-
-}
-
-mount {
-       cpu = /tmp/cpu;
-       cpuacct = /tmp/cpuacct;
-}
+#group daemons/ftp {
+#      perm {
+#              task {
+#                      uid = root;
+#                      gid = ftpmaster;
+#              }
+#              admin {
+#                      uid = root;
+#                      gid = root;
+#              }
+#      }
+#      cpu {
+#              cpu.shares = 500;
+#      }
+#}
+#
+#mount {
+#      cpu = /mnt/cgroups/cpu;
+#      cpuacct = /mnt/cgroups/cpuacct;
+#}
index 14209e5d127eac100ee000224efc605f200479da..6acbf79edf0aebdc726c572a865f8c54336aec74 100644 (file)
@@ -1,4 +1,4 @@
-# /etc/cgred.d/cgred.conf - CGroup Rules Engine Daemon configuration file
+# /etc/sysconfig/cgred.conf - CGroup Rules Engine Daemon configuration file
 # 
 # The four options listed below (CONFIG_FILE, LOG_FILE, NODAEMON, LOG) are
 # the only valid ones.  Defining anything else in this file will cause the
index f0eebc4e6c7941abed2c3b0af7b3b4fdcf0190ab..bdd797943748c90e0075453ada010008f481adee 100644 (file)
@@ -48,8 +48,8 @@ CGRED_BIN=${exec_prefix}/${bindir}/cgrulesengd
 . /lib/lsb/init-functions
 
 # Read in configuration options.
-if [ -f "/etc/cgred.d/cgred.conf" ] ; then
-       . /etc/cgred.d/cgred.conf
+if [ -f "/etc/sysconfig/cgred.conf" ] ; then
+       . /etc/sysconfig/cgred.conf
        OPTIONS="$NODAEMON $LOG"
        if [ -n "$LOG_FILE" ]; then
                OPTIONS="$OPTIONS --log-file=$LOG_FILE"