Update of /cvsroot/devil-linux/build/scripts/scripts
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv18243/scripts/scripts
Modified Files:
heartbeat ldirectord
Log Message:
final fixes for getting heartbeat to work
Index: heartbeat
===================================================================
RCS file: /cvsroot/devil-linux/build/scripts/scripts/heartbeat,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- heartbeat 12 Dec 2015 21:52:00 -0000 1.7
+++ heartbeat 12 Dec 2015 22:39:51 -0000 1.8
@@ -44,6 +44,22 @@
# Default-Stop: 0 1 6
### END INIT INFO
+# settings
+source /etc/sysconfig/config
+
+# parameters
+CONFIGNAME=HEARTBEAT
+
+eval START=\$START_$CONFIGNAME
+
+# Determine the base and follow a runlevel link name.
+base=${0##*/}
+link=${base#*[SK][0-9][0-9]}
+
+# Force execution if not called by a runlevel directory.
+test $link = $base && START=yes
+test "$START" = "yes" || exit 0
+
test -r /lib/lsb/init-functions && . /lib/lsb/init-functions
HEARTBEAT=/usr/libexec/heartbeat/heartbeat
Index: ldirectord
===================================================================
RCS file: /cvsroot/devil-linux/build/scripts/scripts/ldirectord,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ldirectord 10 Mar 2006 01:46:03 -0000 1.2
+++ ldirectord 12 Dec 2015 22:39:51 -0000 1.3
@@ -2,9 +2,10 @@
#
# ldirectord Linux Director Daemon
#
-# chkconfig: 2345 92 40
+# chkconfig: - 92 40
# description: Start and stop ldirectord on non-heartbeat systems
# Using the config file /etc/ha.d/ldirectord.cf
+# Normally ldirectord is started and stopped by heartbeat
#
# processname: ldirectord
# config: /etc/ha.d/ldirectord.cf
@@ -15,7 +16,8 @@
#
### BEGIN INIT INFO
# Provides: ldirectord
-# Required-Start: $syslog $network
+# Required-Start: $syslog $network $remote_fs
+# Required-Stop: $syslog $network $remote_fs
# Should-Start: $time sshd
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
@@ -50,23 +52,22 @@
[ -f /etc/rc.d/init.d/functions ]
then
. /etc/rc.d/init.d/functions
-else
- function action {
- echo -n "$1... "
- shift
- $@
- stat=$?
- if [ $stat = 0 ]; then
- echo success
- else
- echo failure
- fi
- return $stat
- }
fi
[ -x $DAEMON ] || exit 0
+action() {
+ echo -n "$1... "
+ shift
+ $@
+ stat=$?
+ if [ $stat = 0 ]; then
+ echo success
+ else
+ echo failure
+ fi
+ return $stat
+}
######################################################################
# Read arument and take action as appropriate
@@ -75,9 +76,11 @@
case "$1" in
start)
action "Starting ldirectord" $DAEMON start
+ touch /var/lock/subsys/ldirectord
;;
stop)
action "Stopping ldirectord" $DAEMON stop
+ rm -f /var/lock/subsys/ldirectord
;;
restart)
action "Restarting ldirectord" $DAEMON restart
|