]> 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:41:10 +0000 (14:41 +0000)
committerBalbir Singh <balbir@linux.vnet.ibm.com>
Mon, 23 Feb 2009 14:41:10 +0000 (14:41 +0000)
This patch fixes spec file handling of daemon parts of libcg
(add chkconfig to post and including dependency, fix preun script).
And fix the levels in which is this daemon start by default (should not be any).

Signed-off-by: Ivana Varekova <varekova@redhat.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@338 4f4bb910-9a46-0410-90c8-c897d4f1cd53

libcgroup.spec.in
scripts/init.d/cgconfig
scripts/init.d/cgred

index f96b7844f564bca789cc92d75a82638f128fa36c..5fac72c416ce96da470f7b310b213ef49e948d29 100644 (file)
@@ -11,6 +11,7 @@ BuildRequires: byacc
 BuildRequires: flex
 BuildRequires: coreutils
 Requires(post): chkconfig, /sbin/service
+Requires(preun): /sbin/chkconfig
 
 %description
 Control groups infrastructure. The tools and library help manipulate, control,
@@ -50,17 +51,16 @@ rm -rf $RPM_BUILD_ROOT
 
 %post 
 /sbin/ldconfig
-#
-# Do this later if required
-#
-#/sbin/chkconfig --add cgred
-#/sbin/chkconfig --add cgconfig
+/sbin/chkconfig --add cgred
+/sbin/chkconfig --add cgconfig
 
 %preun
-/sbin/service cgred stop > /dev/null 2>&1 || :
-/sbin/service cgconfig stop > /dev/null 2>&1 || :
-/sbin/chkconfig --del cgconfig
-/sbin/chkconfig --del cgred
+if [ $1 = 0 ]; then
+    /sbin/service cgred stop > /dev/null 2>&1 || :
+    /sbin/service cgconfig stop > /dev/null 2>&1 || :
+    /sbin/chkconfig --del cgconfig
+    /sbin/chkconfig --del cgred
+fi
 
 %postun -p /sbin/ldconfig
 
index 507320f53c08e7dd475f580ad1538f2eb2c8f806..ad490ce771061e1a6653d77141e2c559e006a043 100644 (file)
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 #
 # cgconfig Control Groups Configuration Startup
-# chkconfig: 2345 80 20
+# chkconfig: - 13 87
 # description: This script runs the cgconfigparser utility to parse and setup
 #              the control group filesystem. It uses /etc/cgconfig.conf
 #              and parses the configuration specified in there.
@@ -25,8 +25,6 @@
 # Required-Stop:        $local_fs $syslog
 # Should-Start:
 # Should-Stop:
-# Default-Start:        2 3 4 5
-# Default-Stop:         0 1 6
 # Short-Description:    start and stop the WLM configuration
 # Description:          This script allows us to create a default configuration
 ### END INIT INFO
index bdd797943748c90e0075453ada010008f481adee..b4a112be15080e98fb53eb31f3fff1c636c5882b 100644 (file)
@@ -14,7 +14,7 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 #
 # cgred                GGroups Rules Engine Daemon
-# chkconfig:   2345 80 20
+# chkconfig:   - 13 87
 # description: This is a daemon for automatically classifying processes \
 #              into cgroups based on UID/GID.
 #
@@ -27,8 +27,6 @@
 # Required-Stop:       $local_fs $syslog
 # Should-Start:                
 # Should-Stop:         
-# Default-Start:       2 3 4 5
-# Default-Stop:                0 1 6
 # Short-Description:   start and stop the cgroups rules engine daemon
 # Description:         CGroup Rules Engine is a tool for automatically using \
 #                      cgroups to classify processes