summaryrefslogtreecommitdiffstats
path: root/testing/drbd/drbd.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-08-14 10:04:59 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-08-14 11:01:40 +0000
commit6da9c3f6ffb763c72d8d9d809c7a83711de9a3cd (patch)
treea9e1a6dc5f2988630afd16e227096f8a88483773 /testing/drbd/drbd.initd
parentca1c0c9e3842b7bf4904e58bdb796097df1d8bee (diff)
downloadaports-6da9c3f6ffb763c72d8d9d809c7a83711de9a3cd.tar.bz2
aports-6da9c3f6ffb763c72d8d9d809c7a83711de9a3cd.tar.xz
testing/drbd: upgrade to 8.4.3
Diffstat (limited to 'testing/drbd/drbd.initd')
-rw-r--r--testing/drbd/drbd.initd24
1 files changed, 12 insertions, 12 deletions
diff --git a/testing/drbd/drbd.initd b/testing/drbd/drbd.initd
index d5ce7d8e3..c94c5645c 100644
--- a/testing/drbd/drbd.initd
+++ b/testing/drbd/drbd.initd
@@ -30,7 +30,7 @@ fi
# redirection.
$DRBDADM sh-nop
-function assure_module_is_loaded() {
+assure_module_is_loaded() {
[ -e "$PROC_DRBD" ] && return
ebegin "Loading drbd module"
ret=0
@@ -40,7 +40,7 @@ function assure_module_is_loaded() {
return $ret
}
-function adjust_with_progress() {
+adjust_with_progress() {
IFS_O=$IFS
NEWLINE='
'
@@ -50,12 +50,12 @@ function adjust_with_progress() {
local N=0
einfon "Setting drbd parameters "
- COMMANDS=`$DRBDADM -d adjust all` || {
+ COMMANDS=`$DRBDADM -d adjust all` || {
eend 20 "Error executing drbdadm"
- return 20
+ return 20
}
echo -n "[ "
-
+
for CMD in $COMMANDS; do
if echo $CMD | grep -q disk; then echo -n "d$D "; D=$(( D+1 ));
elif echo $CMD | grep -q syncer; then echo -n "s$S "; S=$(( S+1 ));
@@ -64,7 +64,7 @@ function adjust_with_progress() {
fi
IFS=$IFS_O
$CMD || {
- echo
+ echo
eend 20 "cmd $CMD failed!"
return 20
}
@@ -72,7 +72,7 @@ function adjust_with_progress() {
done
echo "]"
eend 0
-
+
IFS=$IFS_O
}
@@ -101,7 +101,7 @@ start() {
echo
sleep 5
-
+
einfon "Become primary if configured "
$DRBDADM sh-b-pri all
echo
@@ -112,7 +112,7 @@ start() {
stop() {
ebegin "Stopping all DRBD resources"
-
+
# Check for mounted drbd devices
if ! grep -q '^/dev/drbd' /proc/mounts &>/dev/null; then
if [ -e ${PROC_DRBD} ]; then
@@ -120,8 +120,8 @@ stop() {
ret=$?
sleep 3
if [ -e /proc/modules ] && grep -q '^drbd' /proc/modules ; then
- ${RMMOD} drbd
- fi
+ ${RMMOD} drbd
+ fi
fi
eend $ret
return $ret
@@ -135,7 +135,7 @@ stop() {
status() {
# NEEDS to be heartbeat friendly...
# so: put some "OK" in the output.
-
+
if [ -e $PROC_DRBD ]; then
ret=0
ebegin "drbd driver loaded OK; device status:"