]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
libcgroup: Add new command line options to sample config file
authorDhaval Giani <dhaval@linux.vnet.ibm.com>
Thu, 12 Feb 2009 16:05:00 +0000 (16:05 +0000)
committerDhaval Giani <dhaval@linux.vnet.ibm.com>
Thu, 12 Feb 2009 16:05:00 +0000 (16:05 +0000)
From: Jan Safranek <jsafrane@redhat.com>

Add new command line options to sample config file

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Acked-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@322 4f4bb910-9a46-0410-90c8-c897d4f1cd53

samples/cgred.conf
scripts/init.d/cgred

index 5363be5ac42f1c519abc7592a01b1b2b559f9c39..14209e5d127eac100ee000224efc605f200479da 100644 (file)
@@ -1,19 +1,22 @@
 # /etc/cgred.d/cgred.conf - CGroup Rules Engine Daemon configuration file
 # 
-# The four options listed below (CONFIG_FILE, LOG_FILE, NODAEMON, NOLOG) are
+# 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
 # CGroup Rules Engine program to fail.  So, don't do it.
 
 # The pathname to the configuration file for CGroup Rules Engine
 CONFIG_FILE="/etc/cgrules.conf"
 
-# The pathname to the log file for CGroup Rules Engine
-LOG_FILE="/root/cgrulesengd.log"
+# Uncomment the following line to log to specified file instead of syslog
+#LOG_FILE="/var/log/cgrulesengd.log"
 
 # Uncomment the second line to run CGroup Rules Engine in non-daemon mode
 NODAEMON=""
 #NODAEMON="--nodaemon"
 
 # Uncomment the second line to disable logging for CGroup Rules Engine
-NOLOG=""
-#NOLOG="--nolog"
+# Uncomment the third line to enable more verbose logging.
+LOG=""
+#LOG="--nolog"
+#LOG="-v"
+
index ee9fc40ec6c32975a1962d0c67c09179b1393211..f0eebc4e6c7941abed2c3b0af7b3b4fdcf0190ab 100644 (file)
@@ -50,7 +50,10 @@ CGRED_BIN=${exec_prefix}/${bindir}/cgrulesengd
 # Read in configuration options.
 if [ -f "/etc/cgred.d/cgred.conf" ] ; then
        . /etc/cgred.d/cgred.conf
-       OPTIONS="--log $LOG_FILE $NODAEMON $NOLOG"
+       OPTIONS="$NODAEMON $LOG"
+       if [ -n "$LOG_FILE" ]; then
+               OPTIONS="$OPTIONS --log-file=$LOG_FILE"
+       fi
 else
        OPTIONS=""
 fi