Hello, I'm not sure about this change. >From my point of view cgconfig should work, when the file is empty (it is >equivalent to file which contains only comments). But it should return an error when the file is missing (somebody remove that file, because of it is there by default). It is only my opinion I can't find any example which deals with the similar situation. Dhaval, please what is your opinion. Ivana
----- Original Message ----- > From: "Weng Meiling" <wengmeiling.w...@huawei.com> > To: "Libcg Development list" <libcg-devel@lists.sourceforge.net> > Sent: Friday, August 30, 2013 8:50:45 AM > Subject: [Libcg-devel] [PATCH] cgconfig:cgconfig service should start when > the cgconfig.conf is empty > > From: Weng Meiling <wengmeiling.w...@huawei.com> > > cgconfig service could start successfully when /etc/cgconfig.conf > only contains comments. But failed when /etc/cgconfig.conf is empty > or missing. The behavior of cgconfig service should be consistent > with cgred service. > > This patch allows the cgconfig service start even when the /etc/cgconfig.conf > files is empty or missing. > > Signed-off-by: Weng Meiling <wengmeiling.w...@huawei.com> > --- > scripts/init.d/cgconfig.in | 17 +++++++---------- > 1 file changed, 7 insertions(+), 10 deletions(-) > > diff --git a/scripts/init.d/cgconfig.in b/scripts/init.d/cgconfig.in > index f299d0f..b2b5a52 100644 > --- a/scripts/init.d/cgconfig.in > +++ b/scripts/init.d/cgconfig.in > @@ -103,16 +103,13 @@ start() { > fi > > if [ $? -eq 0 ]; then > - if [ ! -s $CONFIG_FILE ]; then > - log_failure_msg $CONFIG_FILE "is not configured" > - return 6 > - fi > - > - $CGCONFIGPARSER_BIN -l $CONFIG_FILE > - retval=$? > - if [ $retval -ne 0 ]; then > - log_failure_msg "Failed to parse " $CONFIG_FILE > - return 1 > + if [ -s $CONFIG_FILE ]; then > + $CGCONFIGPARSER_BIN -l $CONFIG_FILE > + retval=$? > + if [ $retval -ne 0 ]; then > + log_failure_msg "Failed to parse " $CONFIG_FILE > + return 1 > + fi > fi > fi > > -- > 1.8.2.2 > > > ------------------------------------------------------------------------------ > Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! > Discover the easy way to master current and previous Microsoft technologies > and advance your career. Get an incredible 1,500+ hours of step-by-step > tutorial videos with LearnDevNow. Subscribe today and save! > http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk > _______________________________________________ > Libcg-devel mailing list > Libcg-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/libcg-devel > ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. Consolidate legacy IT systems to a single system of record for IT 2. Standardize and globalize service processes across IT 3. Implement zero-touch automation to replace manual, redundant tasks http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel