Send Linux-ha-cvs mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."
Today's Topics:
1. Linux-HA CVS: resources by alan from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Sun, 16 Apr 2006 00:43:40 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: resources by alan from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : alan
Host :
Project : linux-ha
Module : resources
Dir : linux-ha/resources/OCF
Modified Files:
apache.in
Log Message:
Fixed several minor problems with return codes
Also changed the order things were validated
so that checks for some "normal" errors come last.
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/resources/OCF/apache.in,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- apache.in 10 Mar 2006 04:14:20 -0000 1.16
+++ apache.in 16 Apr 2006 06:43:39 -0000 1.17
@@ -451,16 +451,6 @@
}
validate_all_apache() {
- if [ ! -f $CONFIGFILE ]; then
-# We are sure to succeed here, since we have parsed $CONFIGFILE before getting
here
- ocf_log err "Configuration file $CONFIGFILE not found!"
- exit $OCF_ERR_ARGS
- fi
-
- if [ ! -x $HTTPD ]; then
- ocf_log err "HTTPD $HTTPD not found or is not an executable!"
- exit $OCF_ERR_ARGS
- fi
if CheckPort $PORT; then
# We are sure to succeed here, since we forced $PORT to be valid in GetParams()
@@ -480,6 +470,16 @@
exit $OCF_ERR_ARGS ;;
esac
fi
+ if [ ! -x $HTTPD ]; then
+ ocf_log err "HTTPD $HTTPD not found or is not an executable!"
+ exit $OCF_ERR_ARGS
+ fi
+ if [ ! -f $CONFIGFILE ]; then
+# We are sure to succeed here, since we have parsed $CONFIGFILE before getting
here
+ ocf_log err "Configuration file $CONFIGFILE not found!"
+ exit $OCF_ERR_CONFIGURED
+ fi
+
return $OCF_SUCCESS
}
@@ -496,6 +496,7 @@
usage
fi
+LSB_STATUS_STOPPED=3
if
[ "X$HTTPD" = X -o ! -f "$HTTPD" -o ! -x "$HTTPD" ]
then
@@ -514,17 +515,23 @@
fi
done
# It is possible that we still do not have a valid httpd at this stage
- if [ -z $HTTPD ]; then
+ if
+ [ -z "$HTTPD" ]
+ then
+ case $COMMAND in
+ stop) return $OCF_SUCCESS;;
+ monitor) return $OCF_NOT_RUNNING;;
+ status) return $LSB_STATUS_STOPPED;;
+ esac
ocf_log err "No valid httpd found! Please revise your <HTTPDLIST>
item"
- exit $OCF_ERR_ARGS
- fi
+ exit $OCF_ERR_CONFIGURED
+ fi
# Let the user know that the $HTTPD used is not the one (s)he specified via
$OCF_RESKEY_httpd
if
[ "X$OCF_RESKEY_httpd" != X ]
then
ocf_log info "Using $HTTPD as HTTPD"
fi
-
DefaultConfig=$DEFAULT_NORMCONFIG;;
esac
fi
@@ -551,7 +558,7 @@
: OK
else
ocf_log err "Cannot parse config file [$CONFIGFILE]"
- exit $OCF_ERR_ARGS
+ exit $OCF_ERR_CONFIGURED
fi
case $COMMAND in
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 29, Issue 89
********************************************