⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ip-request

📁 linux集群服务器软件代码包
💻
字号:
#!/bin/sh##	This script is called to "give up" an IP address when requested##	It could be that we don't have it, in which case we ignore the request.###	Note: this script is called by the heartbeat code, so it gets#	most of its arguments through the environment.#. $HA_FUNCSIFCONFIG=/sbin/ifconfigROUTE=/sbin/routeRSCMGR=$HA_BIN/ResourceManager### Really a resource group name...case "$HA_ipaddr" in    ?*)		false;;    *)  	cat <<-!EOF	$0 will give up the specified IP address if we have it assigned to us.	Otherwise it will do nothing.		$0 was invoked with these arguments:	$*	And this is the HA_ environment:	!EOF	env | grep '^HA_'	exit 1;;esac##	HA_t, HA_src, and HA_ipaddr are fields the sender put in the message#CMD=$HA_tORIGNODE=$HA_srcIPADDR=$HA_ipaddrif  [ "X$ORIGNODE" = "X$HA_CURHOST" ]then  exit 0; # request is from us!fi#	#	Ignore this request if we don't own this resource#if  $RSCMGR status $IPADDRthen  weown=yes  if    [ -x $HA_RCDIR/local_giveip ]  then    $HA_RCDIR/local_giveip $*  fi  $RSCMGR givegroup $IPADDRelse  weown=nofi##	Now give our ip-request-response message...#ha_clustermsg <<!MSGt=$CMD-respdest=$ORIGNODEipaddr=$IPADDRweown=$weownok=OK!MSG

⌨️ 快捷键说明

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