this allows packages to create cgroups by just dumping files into this directory. packagers need to look out for naming conflicts themselves, but not many packages are going to use this in the near future, so this is is probably not so bad.
Signed-off-by: Torben Hohn <torb...@gmx.de> --- scripts/init.d/cgconfig.in | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/scripts/init.d/cgconfig.in b/scripts/init.d/cgconfig.in index 0b3afd2..476dc7b 100644 --- a/scripts/init.d/cgconfig.in +++ b/scripts/init.d/cgconfig.in @@ -34,6 +34,7 @@ pref...@prefix@;exec_pref...@exec_prefix@;sbind...@sbindir@ CGCONFIGPARSER_BIN=$sbindir/cgconfigparser CGROUP_FS=cgroup CONFIG_FILE=/etc/cgconfig.conf +CONFIG_DIR=/etc/cgconfig.conf.d # support multiple mount points declare -a MOUNTPOINT @@ -127,6 +128,18 @@ start() { log_failure_msg "Failed to parse " $CONFIG_FILE return 1 fi + + if [ -d $CONFIG_DIR ] + then + for config in $CONFIG_DIR/*; do + $CGCONFIGPARSER_BIN -l $config + retval = $? + if [ $retval -ne 0 ] + then + log_failure_msg "Failed to parse " $config + fi + done + fi fi if [ $CREATE_DEFAULT == "yes" ]; then -- 1.7.2.3 ------------------------------------------------------------------------------ Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel