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>
LICENSE = "BSD"
DEPENDS = "groff-native"
-PR = "r0"
+PR = "r1"
SRC_URI = " \
ftp://ftp@corosync.org/downloads/corosync-${PV}/corosync-${PV}.tar.gz \
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 $?
}
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
}
restart() {
+ if [ ! -f "$configfile" ]; then
+ echo "Error: corosync is not configured ($configfile missing)"
+ exit 1
+ fi
+
stop
start
}