Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: Dev

[PATCH] return $OCF_SUCCESS when trying to stop a stopped postfix instance

 

 

Linux-HA dev RSS feed   Index | Next | Previous | View Threaded


r.bhatia at ipax

Nov 10, 2009, 3:55 AM

Post #1 of 2 (445 views)
Permalink
[PATCH] return $OCF_SUCCESS when trying to stop a stopped postfix instance

# HG changeset patch
# User Raoul Bhatia [IPAX] <r.bhatia [at] ipax>
# Date 1257854008 -3600
# Node ID 0c45b1ec92c5adcd98f734eb4451698b35070c8c
# Parent f1afdd4e62d8e34229804cd1444c7774e3925c50
return $OCF_SUCCESS when trying to stop a stopped postfix instance

diff -r f1afdd4e62d8 -r 0c45b1ec92c5 heartbeat/postfix
--- a/heartbeat/postfix Tue Nov 10 12:51:44 2009 +0100
+++ b/heartbeat/postfix Tue Nov 10 12:53:28 2009 +0100
@@ -141,6 +141,13 @@

postfix_stop()
{
+ # if Postfix is not running return success
+ if ! postfix_status; then
+ ocf_log info "Postfix already stopped."
+ return $OCF_SUCCESS
+ fi
+
+ # stop Postfix
$binary $OPTIONS stop >/dev/null 2>&1
ret=$?

@@ -245,7 +252,7 @@
#echo OCF_RESKEY_parameters=$OCF_RESKEY_parameters >> /tmp/prox_conf_$OCF_RESOURCE_INSTANCE


-# build postfix options string *outside* to access from each method
+# build Postfix options string *outside* to access from each method
OPTIONS=''
OPTION_CONFIG_DIR=''

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


dejanmm at fastmail

Nov 10, 2009, 5:07 AM

Post #2 of 2 (401 views)
Permalink
Re: [PATCH] return $OCF_SUCCESS when trying to stop a stopped postfix instance [In reply to]

Hi,

This is basically the same patch as the one already posted, i.e.
you could've just acked it. Anyway, applying this version.

Cheers,

Dejan

On Tue, Nov 10, 2009 at 12:55:19PM +0100, Raoul Bhatia [IPAX] wrote:
> # HG changeset patch
> # User Raoul Bhatia [IPAX] <r.bhatia [at] ipax>
> # Date 1257854008 -3600
> # Node ID 0c45b1ec92c5adcd98f734eb4451698b35070c8c
> # Parent f1afdd4e62d8e34229804cd1444c7774e3925c50
> return $OCF_SUCCESS when trying to stop a stopped postfix instance
>
> diff -r f1afdd4e62d8 -r 0c45b1ec92c5 heartbeat/postfix
> --- a/heartbeat/postfix Tue Nov 10 12:51:44 2009 +0100
> +++ b/heartbeat/postfix Tue Nov 10 12:53:28 2009 +0100
> @@ -141,6 +141,13 @@
>
> postfix_stop()
> {
> + # if Postfix is not running return success
> + if ! postfix_status; then
> + ocf_log info "Postfix already stopped."
> + return $OCF_SUCCESS
> + fi
> +
> + # stop Postfix
> $binary $OPTIONS stop >/dev/null 2>&1
> ret=$?
>
> @@ -245,7 +252,7 @@
> #echo OCF_RESKEY_parameters=$OCF_RESKEY_parameters >> /tmp/prox_conf_$OCF_RESOURCE_INSTANCE
>
>
> -# build postfix options string *outside* to access from each method
> +# build Postfix options string *outside* to access from each method
> OPTIONS=''
> OPTION_CONFIG_DIR=''
>
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Linux-HA dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.