diff options
Diffstat (limited to 'source/a/libcgroup/libcgroup.init.diff')
-rw-r--r-- | source/a/libcgroup/libcgroup.init.diff | 147 |
1 files changed, 76 insertions, 71 deletions
diff --git a/source/a/libcgroup/libcgroup.init.diff b/source/a/libcgroup/libcgroup.init.diff index 1d1be2cc0..d3e6e7bad 100644 --- a/source/a/libcgroup/libcgroup.init.diff +++ b/source/a/libcgroup/libcgroup.init.diff @@ -1,70 +1,10 @@ ---- ./scripts/init.d/cgred.in.orig 2014-01-13 08:05:56.000000000 -0600 -+++ ./scripts/init.d/cgred.in 2017-02-28 12:41:11.307424565 -0600 -@@ -39,13 +39,12 @@ - # Sanity checks - [ -x $CGRED_BIN ] || exit 1 - --# Source function library & LSB routines -+# Source function library - . /etc/rc.d/init.d/functions --. /lib/lsb/init-functions - - # Read in configuration options. --if [ -f "/etc/sysconfig/cgred.conf" ] ; then -- . /etc/sysconfig/cgred.conf -+if [ -f /etc/cgred.conf ] ; then -+ . /etc/cgred.conf - OPTIONS="$NODAEMON $LOG" - if [ -n "$LOG_FILE" ]; then - OPTIONS="$OPTIONS --logfile=$LOG_FILE" -@@ -70,13 +69,13 @@ - { - echo -n $"Starting CGroup Rules Engine Daemon: " - if [ -f "$lockfile" ]; then -- log_failure_msg "$servicename is already running with PID `cat ${pidfile}`" -+ echo "$servicename is already running with PID `cat ${pidfile}`" - return 0 - fi - num=`grep "cgroup" /proc/mounts | awk '$3=="cgroup"' | wc -l` - if [ $num -eq 0 ]; then - echo -- log_failure_msg $"Cannot find cgroups, is cgconfig service running?" -+ echo $"Cannot find cgroups, is cgconfig service running?" - return 1 - fi - daemon --check $servicename --pidfile $pidfile $CGRED_BIN $OPTIONS -@@ -97,7 +96,7 @@ - { - echo -n $"Stopping CGroup Rules Engine Daemon..." - if [ ! -f $pidfile ]; then -- log_success_msg -+ #log_success_msg - return 0 - fi - killproc -p $pidfile -TERM "$processname" -@@ -143,13 +142,13 @@ - echo $"Reloading rules configuration..." - kill -s 12 `cat ${pidfile}` - RETVAL=$? -- if [ $RETVAL -eq 0 ] ; then -- log_success_msg -- else -- log_failure_msg -- fi -+ #if [ $RETVAL -eq 0 ] ; then -+ # log_success_msg -+ #else -+ # log_failure_msg -+ #fi - else -- log_failure_msg "$servicename is not running." -+ echo "$servicename is not running." - fi - ;; - *) --- ./scripts/init.d/cgconfig.in.orig 2014-01-13 08:05:56.000000000 -0600 -+++ ./scripts/init.d/cgconfig.in 2017-02-28 12:42:13.278423245 -0600 -@@ -36,11 +36,6 @@ ++++ ./scripts/init.d/cgconfig.in 2023-08-12 12:55:10.109117713 -0500 +@@ -33,14 +33,10 @@ + prefix=@prefix@;exec_prefix=@exec_prefix@;sbindir=@sbindir@ + CGCONFIGPARSER_BIN=$sbindir/cgconfigparser + CONFIG_FILE=/etc/cgconfig.conf ++CONFIG_DIR=/etc/cgconfig.d servicename=cgconfig lockfile=/var/lock/subsys/$servicename @@ -76,7 +16,7 @@ # read the config CREATE_DEFAULT=yes if [ -e /etc/sysconfig/cgconfig ]; then -@@ -54,8 +49,8 @@ +@@ -54,8 +50,8 @@ read user ctrl defaultcgroup <<< \ $(grep -m1 '^\*[[:space:]]\+' /etc/cgrules.conf) if [ -n "$defaultcgroup" -a "$defaultcgroup" = "*" ]; then @@ -87,7 +27,7 @@ defaultcgroup= fi fi -@@ -98,20 +93,20 @@ +@@ -98,20 +94,20 @@ start() { echo -n "Starting cgconfig service: " if [ -f "$lockfile" ]; then @@ -103,7 +43,8 @@ return 6 fi - $CGCONFIGPARSER_BIN -l $CONFIG_FILE +- $CGCONFIGPARSER_BIN -l $CONFIG_FILE ++ $CGCONFIGPARSER_BIN -l $CONFIG_FILE -L $CONFIG_DIR retval=$? if [ $retval -ne 0 ]; then - log_failure_msg "Failed to parse " $CONFIG_FILE @@ -111,7 +52,7 @@ return 1 fi fi -@@ -123,18 +118,18 @@ +@@ -123,18 +119,18 @@ touch "$lockfile" retval=$? if [ $retval -ne 0 ]; then @@ -127,10 +68,74 @@ stop() { echo -n "Stopping cgconfig service: " - cgclear -+ /usr/sbin/cgclear -l /etc/cgconfig.conf ++ /usr/sbin/cgclear -l $CONFIG_FILE -L $CONFIG_DIR rm -f "$lockfile" - log_success_msg + #log_success_msg return 0 } +--- ./scripts/init.d/cgred.in.orig 2014-01-13 08:05:56.000000000 -0600 ++++ ./scripts/init.d/cgred.in 2023-08-12 12:53:58.042116101 -0500 +@@ -39,13 +39,12 @@ + # Sanity checks + [ -x $CGRED_BIN ] || exit 1 + +-# Source function library & LSB routines ++# Source function library + . /etc/rc.d/init.d/functions +-. /lib/lsb/init-functions + + # Read in configuration options. +-if [ -f "/etc/sysconfig/cgred.conf" ] ; then +- . /etc/sysconfig/cgred.conf ++if [ -f /etc/cgred.conf ] ; then ++ . /etc/cgred.conf + OPTIONS="$NODAEMON $LOG" + if [ -n "$LOG_FILE" ]; then + OPTIONS="$OPTIONS --logfile=$LOG_FILE" +@@ -70,13 +69,13 @@ + { + echo -n $"Starting CGroup Rules Engine Daemon: " + if [ -f "$lockfile" ]; then +- log_failure_msg "$servicename is already running with PID `cat ${pidfile}`" ++ echo "$servicename is already running with PID `cat ${pidfile}`" + return 0 + fi + num=`grep "cgroup" /proc/mounts | awk '$3=="cgroup"' | wc -l` + if [ $num -eq 0 ]; then + echo +- log_failure_msg $"Cannot find cgroups, is cgconfig service running?" ++ echo $"Cannot find cgroups, is cgconfig service running?" + return 1 + fi + daemon --check $servicename --pidfile $pidfile $CGRED_BIN $OPTIONS +@@ -97,7 +96,7 @@ + { + echo -n $"Stopping CGroup Rules Engine Daemon..." + if [ ! -f $pidfile ]; then +- log_success_msg ++ #log_success_msg + return 0 + fi + killproc -p $pidfile -TERM "$processname" +@@ -143,13 +142,13 @@ + echo $"Reloading rules configuration..." + kill -s 12 `cat ${pidfile}` + RETVAL=$? +- if [ $RETVAL -eq 0 ] ; then +- log_success_msg +- else +- log_failure_msg +- fi ++ #if [ $RETVAL -eq 0 ] ; then ++ # log_success_msg ++ #else ++ # log_failure_msg ++ #fi + else +- log_failure_msg "$servicename is not running." ++ echo "$servicename is not running." + fi + ;; + *) |