summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-cluster/corosync/files/corosync.initd')
-rw-r--r--sys-cluster/corosync/files/corosync.initd11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys-cluster/corosync/files/corosync.initd b/sys-cluster/corosync/files/corosync.initd
index 6c134bd9377a..42507bebca77 100644
--- a/sys-cluster/corosync/files/corosync.initd
+++ b/sys-cluster/corosync/files/corosync.initd
@@ -1,7 +1,7 @@
#!/sbin/runscript
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/corosync/files/corosync.initd,v 1.2 2010/11/17 07:07:03 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/corosync/files/corosync.initd,v 1.3 2014/12/02 14:55:49 ultrabug Exp $
depend() {
need net
@@ -9,6 +9,7 @@ depend() {
}
start() {
+ configtest || return 1
ebegin "Starting Corosync Cluster Engine"
start-stop-daemon --start -q --exec /usr/sbin/corosync \
--pidfile /var/run/corosync.pid --make-pidfile --background \
@@ -21,3 +22,9 @@ stop() {
start-stop-daemon --stop -q --pidfile /var/run/corosync.pid
eend $?
}
+
+configtest() {
+ ebegin "Checking corosync configuration"
+ test -f /etc/corosync/corosync.confs
+ eend $? "failed, please create the corosync configuration file"
+}