ip-request-resp

来自「linux集群服务器软件代码包」· 代码 · 共 53 行

TXT
53
字号
#!/bin/sh##	This script is called in response to an ip-request message after the#	one we've called calls us back.##	What we do then is to take over the IP address requested...##	Note: this script is called by the heartbeat code, so it gets all#	kinds of funny arguments##		"ip-request-resp". $HA_FUNCS##US="ip-request-resp"TAKE=$HA_BIN/ResourceManagerCMD=$1##	$HA_dest, $HA_ipaddr and $HA_ok are fields from the message#REQNODE=$HA_destRSCGRPNAME=$HA_ipaddrRESPONSE=$HA_okTHEYOWN=$HA_weown# Really a resource group name...case "$RSCGRPNAME" in    ?*)		false;;    *)  	cat <<-!EOF	$0 will take control the specified resource group using $TAKE.		$0 was invoked with these arguments:	$*	And this is the HA_ environment:	!EOF	env | grep '^HA_'	exit 1;;esacif  [ "X$REQNODE" != "X$HA_CURHOST" ]then  exit 0; # We didn't request this IP address...  Ignore the response.fiha_log "received $US $RSCGRPNAME $RESPONSE $THEYOWN"case $RESPONSE in  OK)	$TAKE takegroup $RSCGRPNAME;;  *);;esac

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?