diff --git a/heartbeat/ocf-directories.in b/heartbeat/ocf-directories.in index a448abd23..8d7077627 100644 --- a/heartbeat/ocf-directories.in +++ b/heartbeat/ocf-directories.in @@ -1,22 +1,22 @@ # Binaries and binary options for use in Resource Agents prefix=@prefix@ exec_prefix=@exec_prefix@ : ${INITDIR:=@INITDIR@} : ${HA_DIR:=@sysconfdir@/ha.d} : ${HA_RCDIR:=$HA_DIR/rc.d} : ${HA_CONFDIR=$HA_DIR/conf} : ${HA_CF:=$HA_DIR/ha.cf} : ${HA_VARLIB:=@localstatedir@/lib/heartbeat} : ${HA_RSCTMP:=@HA_RSCTMPDIR@} : ${HA_RSCTMP_OLD:=@HA_VARRUNDIR@/heartbeat/rsctmp} : ${HA_FIFO:=@localstatedir@/lib/heartbeat/fifo} : ${HA_BIN:=@libexecdir@/heartbeat} : ${HA_SBIN_DIR:=@sbindir@} : ${HA_DATEFMT:="%Y/%m/%d_%T "} : ${HA_DEBUGLOG:=/dev/null} : ${HA_RESOURCEDIR:=$HA_DIR/resource.d} : ${HA_DOCDIR:=@datadir@/doc/heartbeat} : ${__SCRIPT_NAME:=`basename $0`} : ${HA_VARRUN:=@localstatedir@/run} -: ${HA_VARLOCK:=@localstatedir@/lock/subsys/} +: ${HA_VARLOCK:=@localstatedir@/lock/subsys} diff --git a/heartbeat/shellfuncs.in b/heartbeat/shellfuncs.in index 7786ec3d1..999162012 100644 --- a/heartbeat/shellfuncs.in +++ b/heartbeat/shellfuncs.in @@ -1,96 +1,96 @@ # Author: Alan Robertson # Support: linux-ha-dev@lists.tummy.com # License: GNU Lesser General Public License (LGPL) # # Set these variables if they're not already set... # : ${HA_SBIN_DIR:=@sbindir@} : ${HA_NOARCHBIN:=@datadir@/heartbeat} : ${OCF_AGENTS:=@OCF_RA_DIR@/heartbeat/} export HA_DIR HA_RCDIR HA_FIFO HA_BIN export HA_DEBUGLOG HA_LOGFILE HA_LOGFACILITY export HA_DATEFMT HA_RESOURCEDIR HA_DOCDIR export OCF_AGENTS PATH=$HA_BIN:${HA_SBIN_DIR}:${HA_NOARCHBIN}:$PATH PATH=`echo $PATH | sed -e 's%::%%' -e 's%:\.:%:%' -e 's%^:%%' -e 's%^\.:%%'` export PATH # A suitable echo command Echo() { echo "$@" } # copy stdin (text) to FIFO, with surrounding ">>>" and "<<<" marker lines. # no args.; no result # Notes: # o Using "cat -" rather than "cat" simply for clarity. # o The trailing "| cat -" tries to hold things together as a single # write (which is probably preferable behaviour in this context). ha_clustermsg() { (echo ">>>"; cat -; echo "<<<") | cat - >> $HA_FIFO } ha_parameter() { VALUE=`sed -e 's%[ ][ ]*% %' -e 's%^ %%' -e 's%#.*%%' $HA_CF | grep -i "^$1 " | sed 's%[^ ]* %%'` if [ "X$VALUE" = X ] then case $1 in keepalive) VALUE=2;; deadtime) ka=`ha_parameter keepalive` VALUE=`expr $ka '*' 2 '+' 1`;; esac fi Echo $VALUE } BSD_Status() { local base=${1##*/} local pid ret_status=`/bin/ps -ao pid,command | grep $base | sed 's/ .*//'` if [ "$ret_status" != "" ] then echo "${base} is running..." return 0 fi if [ -f $HA_VARRUN/${base}.pid ] then echo "${base} dead but pid file exists" return 1 fi if [ -f /var/run/${base}.pid ] then echo "${base} dead but pid file exists" return 1 fi if - [ -f $HA_VARLOCK/var/lock/subsys/${base}.pid ] + [ -f $HA_VARLOCK/${base}.pid ] then echo "${base} dead but lock file exists" return 2 fi if [ -f /var/spool/lock/${base} ] then echo "${base} dead but lock file exists" return 2 fi } # Now get the good stuff . @OCF_LIB_DIR@/heartbeat/ocf-shellfuncs