Skip to content

Commit

Permalink
Use command line option for SBD_DELAY_START in sbd.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
krig committed May 17, 2016
1 parent f596a91 commit 6842c78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sbd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@ always) SBD_OPTS+=" -S 0" ;;
clean) SBD_OPTS+=" -S 1" ;;
esac
: ${SBD_DELAY_START:="no"}
if ocf_is_true "$SBD_DELAY_START" ; then
SBD_OPTS+=" -A"
fi

start() {
if ! pidofproc -p $SBD_PIDFILE $SBD_BIN >/dev/null 2>&1 ; then
if ! $SBD_BIN -d $SBD_DEVICE $SBD_OPTS watch ; then
echo "SBD failed to start; aborting."
exit 1
fi
if ocf_is_true ${SBD_DELAY_START} ; then
sleep $(sbd -d "$SBD_DEVICE" dump | grep -m 1 msgwait | awk '{print $4}') 2>/dev/null
fi
else
return 0
fi
Expand Down

0 comments on commit 6842c78

Please sign in to comment.