📄 ip-request-resp
字号:
#!/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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -