testheartbeatcomm.in
来自「在LINUX下实现HA的源代码」· IN 代码 · 共 56 行
IN
56 行
#!/bin/sh# The purpose of this script is to break or fix the communication in the cluster.#HADIR=@sysconfdir@/ha.dHBSCRIPT=@INITDIR@/heartbeat@INIT_EXT@LIBDIR=@libdir@/HBLIB=$LIBDIR/heartbeatTESTFILE=OnlyForTestingUSAGE="Usage: 'TestHeartbeatComm break-communication|fix-communication'"if [ $# -lt 1 ]then echo "$USAGE"; exit 1;ficd @sysconfdir@/ha.d# Create OnlyForTesting File. It is invoked by ParseTestOpts() in heartbeat.cGenerateTestingFile(){ cat <<EOF >$TESTFILExmitloss=1rcvloss=1EOF}DeleteTestingFile(){ rm -f $TESTFILE echo "DeleteTestFileOK"}HBReload(){ $HBSCRIPT reload}OPT=$1case "$OPT" in break-communication) GenerateTestingFile HBReload ;; fix-communication) DeleteTestingFile HBReload ;; *) echo "$USAGE" ;;esacexit $?
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?