diff options
author | Vladimir Sorokin <sorokin@altell.ru> | 2010-09-29 15:20:42 +0400 |
---|---|---|
committer | Roman I Khimov <khimov@altell.ru> | 2010-09-30 23:51:39 +0400 |
commit | 128966821f9d92cc8912c7b23e39c16910caa554 (patch) | |
tree | 4ab86f21d29f54110d18d588610f30dbdc02d5ce /recipes/corosync | |
parent | 5b45248c45d567dc3be3bf02fed37e83ab6c85bc (diff) | |
download | openembedded-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.bb | 2 | ||||
-rw-r--r-- | 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 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 } |