File bsc#1033934-0003-Refactor-sbd.sh-Use-a-more-obvious-variable-on-parsi.patch of Package sbd.10478
From 3e0290974b74170772e37168d6d823334080996e Mon Sep 17 00:00:00 2001
From: "Gao,Yan" <ygao@suse.com>
Date: Thu, 1 Jun 2017 14:59:17 +0200
Subject: [PATCH 3/4] Refactor: sbd.sh: Use a more obvious variable on parsing
devices
---
src/sbd-md.c | 2 +-
src/sbd.sh | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
Index: sbd-1.2.1/src/sbd.sh
===================================================================
--- sbd-1.2.1.orig/src/sbd.sh
+++ sbd-1.2.1/src/sbd.sh
@@ -38,7 +38,7 @@ if [ -z "$SBD_DEVICE" ]; then
exit 1
fi
SBD_DEVS=${SBD_DEVICE%;}
-SBD_DEVICE=${SBD_DEVS//;/ -d }
+SBD_DEVICE_ARGS="-d ${SBD_DEVS//;/ -d }"
: ${SBD_PIDFILE:=/var/run/sbd.pid}
SBD_OPTS+=" -p $SBD_PIDFILE"
@@ -62,12 +62,12 @@ esac
start() {
if ! pidofproc -p $SBD_PIDFILE $SBD_BIN >/dev/null 2>&1 ; then
- if ! $SBD_BIN -d $SBD_DEVICE $SBD_OPTS watch ; then
+ if ! $SBD_BIN $SBD_DEVICE_ARGS $SBD_OPTS watch ; then
echo "SBD failed to start; aborting."
exit 1
fi
if ocf_is_true ${SBD_DELAY_START} ; then
- sleep $($SBD_BIN -d $SBD_DEVICE dump | grep -m 1 msgwait | awk '{print $4}') 2>/dev/null
+ sleep $($SBD_BIN $SBD_DEVICE_ARGS dump | grep -m 1 msgwait | awk '{print $4}') 2>/dev/null
fi
else
return 0
@@ -75,7 +75,7 @@ start() {
}
stop() {
- if ! $SBD_BIN -d $SBD_DEVICE -D $SBD_OPTS message LOCAL exit ; then
+ if ! $SBD_BIN $SBD_DEVICE_ARGS -D $SBD_OPTS message LOCAL exit ; then
echo "SBD failed to stop; aborting."
exit 1
fi