aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/corosync
diff options
context:
space:
mode:
authorVladimir Sorokin <sorokin@altell.ru>2010-09-29 15:20:42 +0400
committerRoman I Khimov <khimov@altell.ru>2010-09-30 23:51:39 +0400
commit128966821f9d92cc8912c7b23e39c16910caa554 (patch)
tree4ab86f21d29f54110d18d588610f30dbdc02d5ce /recipes/corosync
parent5b45248c45d567dc3be3bf02fed37e83ab6c85bc (diff)
downloadopenembedded-128966821f9d92cc8912c7b23e39c16910caa554.tar.gz
corosync: fix init script
Allows to get status from init script when no corosync.cfg exists. Signed-off-by: Vladimir Sorokin <sorokin@altell.ru> Signed-off-by: Roman I Khimov <khimov@altell.ru>
Diffstat (limited to 'recipes/corosync')
-rw-r--r--recipes/corosync/corosync_1.2.8.bb2
-rw-r--r--recipes/corosync/files/init15
2 files changed, 11 insertions, 6 deletions
diff --git a/recipes/corosync/corosync_1.2.8.bb b/recipes/corosync/corosync_1.2.8.bb
index c3e4290009..4b35ac5101 100644
--- a/recipes/corosync/corosync_1.2.8.bb
+++ b/recipes/corosync/corosync_1.2.8.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "OSI Certified implementation of a complete cluster engine"
LICENSE = "BSD"
DEPENDS = "groff-native"
-PR = "r0"
+PR = "r1"
SRC_URI = " \
ftp://ftp@corosync.org/downloads/corosync-${PV}/corosync-${PV}.tar.gz \
diff --git a/recipes/corosync/files/init b/recipes/corosync/files/init
index 7277ca905b..6b397e502f 100644
--- a/recipes/corosync/files/init
+++ b/recipes/corosync/files/init
@@ -26,11 +26,6 @@ prog="corosync"
lockfile="/var/lock/subsys/$prog"
configfile="/etc/corosync/corosync.conf"
-if [ ! -f "$configfile" ]; then
- echo "Error: corosync is not configured ($configfile missing)"
- exit 1
-fi
-
internal_status() {
killall -0 corosync > /dev/null 2>&1
return $?
@@ -49,6 +44,11 @@ status() {
}
start() {
+ if [ ! -f "$configfile" ]; then
+ echo "Error: corosync is not configured ($configfile missing)"
+ exit 1
+ fi
+
echo -n $"Starting Corosync Cluster Engine ($prog): "
if
! internal_status
@@ -128,6 +128,11 @@ stop() {
}
restart() {
+ if [ ! -f "$configfile" ]; then
+ echo "Error: corosync is not configured ($configfile missing)"
+ exit 1
+ fi
+
stop
start
}