This patch is against the fedora package and it is needed only for 
fedora version, git version is not affected by this problem.
Ivana Varekova

Ivana Varekova wrote:
> This patch fixes the problem with log_warning_msg.
> This problem affects only Fedora version (02-fedora-fix-initscripts.patch).
> (see [BUG] cgconfig init script problem thread)
>
> Signed-off-by: Ivana Varekova <[email protected]>
> ---
>
>  scripts/init.d/cgconfig |   28 ++++++++++++++++++++--------
>  1 files changed, 20 insertions(+), 8 deletions(-)
>  mode change 100644 => 100755 scripts/init.d/cgconfig
>
> diff --git a/scripts/init.d/cgconfig b/scripts/init.d/cgconfig
> old mode 100644
> new mode 100755
> index 6b01d9c..62218e7
> --- a/scripts/init.d/cgconfig
> +++ b/scripts/init.d/cgconfig
> @@ -72,7 +72,9 @@ start() {
>          echo -n "Starting cgconfig service: "
>       if [ -f /var/lock/subsys/$servicename ]
>          then
> -            log_warning_msg "lock file already exists"
> +         echo -n "lock file already exists"
> +            warning
> +            echo
>              return
>          fi
>  
> @@ -82,7 +84,9 @@ start() {
>                  retval=$?
>                  if [ $retval -ne 0 ]
>                  then
> -                    log_failure_msg "Failed to parse " $CONFIG_FILE
> +                    echo -n "Failed to parse "$CONFIG_FILE
> +                    failure
> +                    echo
>                      return $retval
>                  fi
>          fi
> @@ -95,8 +99,10 @@ start() {
>                  `grep -m1 ^\* /etc/cgrules.conf`
>              if [[ -n $defaultcgroup && $defaultcgroup = "*" ]]
>              then
> -                log_warning_msg "/etc/cgrules.conf incorrect"
> -                log_warning_msg "Overriding it"
> +                echo "/etc/cgrules.conf incorrect"
> +                echo -n "Overriding it"
> +                warning
> +                echo
>                  defaultcgroup=
>              fi
>          fi
> @@ -140,10 +146,13 @@ start() {
>          retval=$?
>          if [ $retval -ne 0 ]
>          then
> -            log_failure_msg "Failed to touch " /var/lock/subsys/$servicename
> +            echo  "Failed to touch" /var/lock/subsys/$servicename
> +            failure
> +            echo
>              return $retval
>          fi
> -        log_success_msg
> +        success
> +        echo
>          return 0
>  }
>  
> @@ -154,7 +163,9 @@ move_all_to_init_class() {
>          cat /proc/mounts | grep -wq ${MOUNTPOINT[$i]}
>          if [ $? -ne 0 ]
>          then
> -            log_failure_msg "resource control filesystem not mounted"
> +            echo -n "resource control filesystem not mounted"
> +            failure
> +            echo
>              exit 1
>          fi
>  
> @@ -181,7 +192,8 @@ stop() {
>      move_all_to_init_class
>      umount_fs
>      rm -f /var/lock/subsys/$servicename
> -    log_success_msg
> +    success
> +    echo
>  }
>  
>  trapped() {
>
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and 
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today. 
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> Libcg-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/libcg-devel
>
>   


------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to