Hi Ivana,

        what do you think about this patch ?

Thanks!
Weng Meiling

On 2013/8/30 14:50, Weng Meiling wrote:
> 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
> 



------------------------------------------------------------------------------
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

Reply via email to