diff --git a/tools/ocft/Makefile.am b/tools/ocft/Makefile.am index b73905283..c91f2388a 100644 --- a/tools/ocft/Makefile.am +++ b/tools/ocft/Makefile.am @@ -1,47 +1,48 @@ # Author: John Shi # jshi@suse.de # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = $(ocftcfgs_DATA) $(ocft_DATA) sbin_SCRIPTS = ocft ocftcfgsdir = $(datadir)/$(PACKAGE_NAME)/ocft/configs ocftcfgs_DATA = apache \ IPaddr2 \ IPv6addr \ Filesystem \ LVM \ IPsrcaddr \ MailTo \ mysql \ pgsql \ db2 \ drbd.linbit \ nfsserver \ portblock \ iscsi \ named \ postfix \ + Xinetd \ SendArp ocftdir = $(datadir)/$(PACKAGE_NAME)/ocft ocft_DATA = README \ README.zh_CN \ caselib diff --git a/tools/ocft/Xinetd b/tools/ocft/Xinetd new file mode 100644 index 000000000..ba9c85c7f --- /dev/null +++ b/tools/ocft/Xinetd @@ -0,0 +1,56 @@ +# Xinetd + +CONFIG + Agent Xinetd + AgentRoot /usr/lib/ocf/resource.d/heartbeat + InstallPackage xinetd + +CASE-BLOCK required_args + Env OCF_RESKEY_service=discard + +CASE-BLOCK default_status + AgentRun stop + +CASE-BLOCK prepare + Include required_args + Include default_status + +CASE "check base env" + Include prepare + AgentRun start OCF_SUCCESS + +CASE "check base env: unset 'OCF_RESKEY_protocol'" + Include prepare + Unenv OCF_RESKEY_service + AgentRun start OCF_ERR_CONFIGURED + +CASE "normal start" + Include prepare + AgentRun start OCF_SUCCESS + +CASE "normal stop" + Include prepare + AgentRun start + AgentRun stop OCF_SUCCESS + +CASE "double start" + Include prepare + AgentRun start + AgentRun start OCF_SUCCESS + +CASE "double stop" + Include prepare + AgentRun stop OCF_SUCCESS + +CASE "monitor with running" + Include prepare + AgentRun start + AgentRun monitor OCF_SUCCESS + +CASE "monitor with not running" + Include prepare + AgentRun monitor OCF_NOT_RUNNING + +CASE "unimplemented command" + Include prepare + AgentRun no_cmd OCF_ERR_UNIMPLEMENTED