[oe-commits] Vladimir Sorokin : corosync: fix init script
git version control
git at git.openembedded.org
Thu Sep 30 19:52:46 UTC 2010
Module: openembedded.git
Branch: org.openembedded.dev
Commit: 128966821f9d92cc8912c7b23e39c16910caa554
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=128966821f9d92cc8912c7b23e39c16910caa554
Author: Vladimir Sorokin <sorokin at altell.ru>
Date: Wed Sep 29 15:20:42 2010 +0400
corosync: fix init script
Allows to get status from init script when no corosync.cfg exists.
Signed-off-by: Vladimir Sorokin <sorokin at altell.ru>
Signed-off-by: Roman I Khimov <khimov at altell.ru>
---
recipes/corosync/corosync_1.2.8.bb | 2 +-
recipes/corosync/files/init | 15 ++++++++++-----
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 c3e4290..4b35ac5 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 7277ca9..6b397e5 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
}
More information about the Openembedded-commits
mailing list