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

📄 dummy.in

📁 linux集群服务器软件代码包
💻 IN
字号:
#!/bin/sh##	$Id: Dummy.in,v 1.1 2004/08/27 14:12:25 lars Exp $##	Dummy OCF RA. Does nothing but wait a few seconds, can be#	configured to fail occassionally.## Copyright (c) 2004 SUSE LINUX AG, Lars Marowsky-Br閑#                    All Rights Reserved.## This program is free software; you can redistribute it and/or modify# it under the terms of version 2 of the GNU General Public License as# published by the Free Software Foundation.## This program is distributed in the hope that it would be useful, but# WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.## Further, this software is distributed without any warranty that it is# free of the rightful claim of any third person regarding infringement# or the like.  Any license provided herein, whether implied or# otherwise, applies only to this software file.  Patent licenses, if# any, provided herein do not apply to combinations of this program with# other software, or any other product whatsoever.## You should have received a copy of the GNU General Public License# along with this program; if not, write the Free Software Foundation,# Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.######################################################################### Initialization:. @hb_libdir@/ocf-shellfuncs#######################################################################meta_data() {	cat <<END<?xml version="1.0"?><!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd"><resource-agent name="Dummy" version="0.9"><version>1.0</version><longdesc lang="en">This is a Dummy Resource Agent. It does absolutely nothing except waitfor various amounts of time on execution, and fail actions if it sees a/tmp/Dummy.{start,stop,monitor,validate-all} around.</longdesc><shortdesc lang="en">Dummy resource agent</shortdesc><parameters><parameter name="start_delay" unique="0"><longdesc lang="en">How long to delay on start.</longdesc><shortdesc lang="en">Start delay</shortdesc><content type="integer" default="5" /></parameter><parameter name="stop_delay" unique="0"><longdesc lang="en">How long to delay on stop.</longdesc><shortdesc lang="en">Stop delay</shortdesc><content type="integer" default="5" /></parameter><parameter name="monitor_delay" unique="0"><longdesc lang="en">How long to delay on monitor.</longdesc><shortdesc lang="en">Monitor delay</shortdesc><content type="integer" default="2" /></parameter></parameters><actions><action name="start"   timeout="90" /><action name="stop"    timeout="100" /><action name="monitor" depth="0"  timeout="20" interval="10" start-delay="1m" /><action name="meta-data"  timeout="5" /><action name="verify-all"  timeout="30" /></actions></resource-agent>END}#######################################################################dummy_usage() {	cat <<ENDusage: $0 {start|stop|monitor|validate-all|meta-data}Expects to have a fully populated OCF RA-compliant environment set.END}dummy_exit() {	if [ -e /tmp/Dummy.$ACTION ]; then		exit $OCF_ERR_GENERIC	else		exit $OCF_SUCCESS	fi}dummy_start() {	sleep $OCF_RESKEY_start_delay}dummy_stop() {	sleep $OCF_RESKEY_stop_delay}dummy_monitor() {	sleep $OCF_RESKEY_monitor_delay}dummy_validate() {	exit $OC_ERR_UNIMPLEMENTED}case $ACTION inmeta-data)	meta_data		exit $OCF_SUCCESS		;;start)		dummy_start		dummy_exit		;;stop)		dummy_stop		dummy_exit		;;monitor)	dummy_monitor		dummy_exit		;;validate-all)	dummy_validate		dummy_exit		;;usage|help)	dummy_usage		exit $OCF_SUCCESS		;;*)		dummy_usage		exit $OCF_ERR_UNIMPLEMENTED		;;esac

⌨️ 快捷键说明

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