diff options
-rw-r--r-- | libcgroup.spec.in | 18 | ||||
-rw-r--r-- | scripts/init.d/cgconfig | 4 | ||||
-rw-r--r-- | scripts/init.d/cgred | 4 |
3 files changed, 11 insertions, 15 deletions
diff --git a/libcgroup.spec.in b/libcgroup.spec.in index f96b784..5fac72c 100644 --- a/libcgroup.spec.in +++ b/libcgroup.spec.in @@ -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 diff --git a/scripts/init.d/cgconfig b/scripts/init.d/cgconfig index 507320f..ad490ce 100644 --- a/scripts/init.d/cgconfig +++ b/scripts/init.d/cgconfig @@ -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 diff --git a/scripts/init.d/cgred b/scripts/init.d/cgred index bdd7979..b4a112b 100644 --- a/scripts/init.d/cgred +++ b/scripts/init.d/cgred @@ -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 |