On Tue, Dec 28, 2010 at 02:38:38PM +0100, Alexander Krauth wrote: > # HG changeset patch > # User Alexander Krauth <li...@sap.com> > # Date 1293543371 -3600 > # Node ID af62007952a5b32281622e88f3e3faf039aec187 > # Parent 27cfbd94cb36ad2c8d915d078420e41e886c8635 > High: SAPInstance: Fix some returncodes in case of probe and non-probe actions > > diff -r 27cfbd94cb36 -r af62007952a5 heartbeat/SAPInstance > --- a/heartbeat/SAPInstance Tue Dec 28 14:35:01 2010 +0100 > +++ b/heartbeat/SAPInstance Tue Dec 28 14:36:11 2010 +0100 > @@ -67,7 +67,7 @@ > <?xml version="1.0"?> > <!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd"> > <resource-agent name="SAPInstance"> > -<version>2.03</version> > +<version>2.10</version> > > <longdesc lang="en"> > Resource script for SAP. It manages a SAP Instance as an HA resource. > @@ -245,13 +245,7 @@ > > if [ -z "$OCF_RESKEY_DIR_PROFILE" ] > then > - if [ -d /usr/sap/$SID/SYS/profile/ ] > - then > - DIR_PROFILE="/usr/sap/$SID/SYS/profile" > - else > - ocf_log warn "Expected /usr/sap/$SID/SYS/profile/ to be a directory, > please set DIR_PROFILE parameter!" > - exit $OCF_NOT_RUNNING > - fi > + DIR_PROFILE="/usr/sap/$SID/SYS/profile" > else > DIR_PROFILE="$OCF_RESKEY_DIR_PROFILE" > fi > @@ -266,11 +260,6 @@ > if [ -z "$currentSTART_PROFILE" ] > then > SAPSTARTPROFILE="$DIR_PROFILE/START_${InstanceName}_${SAPVIRHOST}" > - if [ ! -r $SAPSTARTPROFILE ] > - then > - ocf_log warn "Expected $SAPSTARTPROFILE to be the instance START > profile, please set START_PROFILE parameter!" > - exit $OCF_NOT_RUNNING > - fi > else > SAPSTARTPROFILE="$currentSTART_PROFILE" > fi > @@ -335,6 +324,21 @@ > > if [ $restart -eq 1 ] > then > + > + if [ -d /usr/sap/$SID/SYS/profile/ ] > + then > + DIR_PROFILE="/usr/sap/$SID/SYS/profile" > + else > + ocf_log warn "Expected /usr/sap/$SID/SYS/profile/ to be a directory, > please set DIR_PROFILE parameter!" > + exit $OCF_NOT_RUNNING > + fi > + > + if [ ! -r $SAPSTARTPROFILE ] > + then > + ocf_log warn "Expected $SAPSTARTPROFILE to be the instance START > profile, please set START_PROFILE parameter!" > + exit $OCF_NOT_RUNNING > + fi > + > pkill -9 -f "sapstartsrv.*$runninginst" > $SAPSTARTSRV pf=$SAPSTARTPROFILE -D -u $sidadm
Applied. > _______________________________________________________ > Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > Home Page: http://linux-ha.org/ _______________________________________________________ Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/