Masato Taruishi
taru****@users*****
2005年 3月 18日 (金) 12:45:59 JST
=================================================================== RCS file: ultrapossum/module/failover/heartbeat/ldap,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -u -r1.7 -r1.7.2.1 --- ultrapossum/module/failover/heartbeat/ldap 2004/10/13 03:20:15 1.7 +++ ultrapossum/module/failover/heartbeat/ldap 2005/03/18 03:45:59 1.7.2.1 @@ -48,12 +48,15 @@ } ldap_stop () { - ha_log "info: $0: Shutting down" - $MODULEDIR/server/startup master_stop - if test "x$HOST" = "x$BACKUP"; then - if test "x`$MODULEDIR/server/startup slave_status`" = "xstopped"; then - ha_log "starting slave slapd" - ldapslave_start + if test "x`$MODULEDIR/server/startup master_status`" = "xrunning"; then + ha_log "info: $0: Shutting down" + $MODULEDIR/server/startup master_stop + touch $FAILOVER_SYNCBACKUP_START.$PPID + if test "x$HOST" = "x$BACKUP" && ! include "$HOST" "$SYNCBACKUPS"; then + if test "x`$MODULEDIR/server/startup slave_status`" = "xstopped"; then + ha_log "starting slave slapd" + ldapslave_start + fi fi fi } =================================================================== RCS file: ultrapossum/module/failover/heartbeat/syncbackup,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -u -r1.5.2.1 -r1.5.2.2 --- ultrapossum/module/failover/heartbeat/syncbackup 2004/11/03 08:00:11 1.5.2.1 +++ ultrapossum/module/failover/heartbeat/syncbackup 2005/03/18 03:45:59 1.5.2.2 @@ -27,10 +27,11 @@ stop () { if test "x`ldapslave_status`" = "xstopped" && - test "$ultrapossum_server_startup" != "stop" + test -O "$FAILOVER_SYNCBACKUP_START.$PPID" then ha_log "Info: $0: starting syncbackup slapd" ldapslave_start + /bin/rm -f "$FAILOVER_SYNCBACKUP_START.$PPID" fi }