亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? main.c

?? linux集群服務器軟件代碼包
?? C
字號:
/* $Id: main.c,v 1.18 2005/02/10 06:47:25 alan Exp $ *//* * Stonith: simple test program for exercising the Stonith API code * * Copyright (C) 2000 Alan Robertson <alanr@unix.sh> * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. *  * This library 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 * Lesser General Public License for more details. *  * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA * */#include <portability.h>#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <string.h>#include <syslog.h>#include <stonith/stonith.h>#include <pils/plugin.h>#include <glib.h>#define	OPTIONS	"F:p:t:T:sSlLvhd"#define	EQUAL	'='extern char *	optarg;extern int	optind, opterr, optopt;static int	debug = 0;void usage(const char * cmd, int exit_status);void confhelp(const char * cmd, FILE* stream);/* * Note that we don't use the cl_log logging code because the STONITH * command is intended to be shipped without the clplumbing libraries. * *	:-( */voidusage(const char * cmd, int exit_status){	FILE *stream;	stream = exit_status ? stderr : stdout;	fprintf(stream, "usage: %s [-sSlLvh] "	"[-t stonith-device-type] "	"[-p stonith-device-parameters] "	"[-F stonith-device-parameters-file] "	"nodename\n", cmd);	fprintf(stream, "\t-L\tlist supported stonith device types\n");	fprintf(stream, "\t-l\tlist hosts controlled by this stonith device\n");	fprintf(stream, "\t-S\treport stonith device status\n");	fprintf(stream, "\t-s\tsilent\n");	fprintf(stream, "\t-v\tverbose\n");	fprintf(stream, "\t-T\t(reset|on|off)\n");	fprintf(stream, "\t-h\tget this help message\n");	confhelp(cmd, stream);	exit(exit_status);}/* Thanks to Lorn Kay <lorn_kay@hotmail.com> for the confhelp code */voidconfhelp(const char * cmd, FILE* stream){	char ** typelist;	char ** this;	Stonith *       s;	fprintf(stream	,	"\nSTONITH -t device types and"		" associated configuration details:\n");	typelist = stonith_types();		if (typelist == NULL) {		fprintf(stderr, 			"Failed to retrieve list of STONITH modules!\n");		return;	}	for(this=typelist; *this; ++this) {		const char *    SwitchType = *this;		const char *	cres;		const char **	pnames;		if ((s = stonith_new(SwitchType)) == NULL) {			fprintf(stderr, "Invalid STONITH type %s(!)\n"			,	SwitchType);			continue;		}		fprintf(stream, "\n\nSTONITH Device: %s - ", SwitchType);		if ((cres = stonith_get_info(s, ST_DEVICEDESCR)) != NULL){			fprintf(stream, "%s\n"			,	cres);		}		if ((cres = stonith_get_info(s, ST_DEVICEURL)) != NULL){			fprintf(stream			,	"For more information see %s\n"			,	cres);		}		if (NULL == (pnames = stonith_get_confignames(s))) {			continue;		}		fprintf(stream		,	"List of valid parameter names for %s STONITH device:\n"		,	SwitchType);		for (;*pnames; ++pnames) {			fprintf(stream			,	"\t%s\n", *pnames);		}#ifdef ST_CONFI_INFO_SYNTAX		fprintf(stream, "\nConfig info [-p] syntax for %s:\n\t%s\n"		,    SwitchType, stonith_get_info(s, ST_CONF_INFO_SYNTAX));#else		fprintf(stream, "For Config info [-p] syntax"		", give each of the above parameters in order as the"		" -p value.\n"		"Arguments are separated by white space.");#endif#ifdef ST_CONFI_FILE_SYNTAX		fprintf(stream, "\nConfig file [-F] syntax for %s:\n\t%s\n"		,    SwitchType, stonith->get_info(s, ST_CONF_FILE_SYNTAX));#else		fprintf(stream		,	"\nConfig file [-F] syntax is the same as -p"		", except # at the start of a line"		"\ndenotes a comment\n");#endif		stonith_delete(s); s = NULL;	}	/* Note that the type list can't/shouldn't be freed */	}#define	MAXNVARG	50intmain(int argc, char** argv){	char *		cmdname;	int		rc;	Stonith *	s;	const char *	SwitchType = NULL;	const char *	optfile = NULL;	const char *	parameters = NULL;	int		reset_type = ST_GENERIC_RESET;	int		verbose = 0;	int		status = 0;	int		silent = 0;	int		listhosts = 0;	int		listtypes = 0;	int		c;	int		errors = 0;	int		argcount;	StonithNVpair	nvargs[MAXNVARG];	int		nvcount=0;	if ((cmdname = strrchr(argv[0], '/')) == NULL) {		cmdname = argv[0];	}else{		++cmdname;	}	while ((c = getopt(argc, argv, OPTIONS)) != -1) {		switch(c) {		case 'd':	debug++;				break;		case 'F':	optfile = optarg;				break;		case 'h':	usage(cmdname, 0);				break;		case 'l':	++listhosts;				break;		case 'L':	++listtypes;				break;		case 'p':	parameters = optarg;				break;		case 's':	++silent;				break;		case 'S':	++status;				break;		case 't':	SwitchType = optarg;				break;		case 'T':	if (strcmp(optarg, "on")== 0) {					reset_type = ST_POWERON;				}else if (strcmp(optarg, "off")== 0) {					reset_type = ST_POWEROFF;				}else if (strcmp(optarg, "reset")== 0) {					reset_type = ST_GENERIC_RESET;				}else{					fprintf(stderr					,	"bad reset type [%s]\n"					,	optarg);					usage(cmdname, 1);				}							break;		case 'v':	++verbose;				break;		default:	++errors;				break;		}	}	if (debug) {		PILpisysSetDebugLevel(debug);	}	if (optfile && parameters) {		++errors;	}	/*	 *	Process name=value arguments on command line...	 */	for (;optind < argc; ++optind) {		char *	eqpos;		if ((eqpos=strchr(argv[optind], EQUAL)) == NULL) {			break;		}		if (parameters)  {			fprintf(stderr			,	"Cannot include both -p and name=value "			" style arguments\n");			usage(cmdname, 1);		}		if (nvcount >= MAXNVARG) {			fprintf(stderr, "Too many n=v arguments\n");			exit(1);		}		nvargs[nvcount].s_name = argv[optind];		*eqpos = EOS;		nvargs[nvcount].s_value = eqpos+1;	}	nvargs[nvcount].s_name = NULL;	nvargs[nvcount].s_value = NULL;	argcount = argc - optind;	if (!(argcount == 1 || (argcount < 1	&&	(status||listhosts||listtypes)))) {		++errors;	}	if (errors) {		usage(cmdname, 1);	}	if (listtypes) {		char **	typelist;		typelist = stonith_types();		if (typelist == NULL) {			syslog(LOG_ERR, "Could not list Stonith types.");		}else{			char **	this;			for(this=typelist; *this; ++this) {				printf("%s\n", *this);			}		}		return(0);	}	if (optfile == NULL && parameters == NULL) {		optfile = "/etc/ha.d/rpc.cfg";	}	if (SwitchType == NULL) {		SwitchType = "baytech";	}#ifndef LOG_PERROR#	define LOG_PERROR	0#endif	openlog(cmdname, (LOG_CONS|(silent ? 0 : LOG_PERROR)), LOG_USER);	s = stonith_new(SwitchType);	if (s == NULL) {		syslog(LOG_ERR, "Invalid device type: '%s'", SwitchType);		exit(S_OOPS);	}	if (debug) {		stonith_set_debug(s, debug);	}	/* Old STONITH version 1 stuff... */	if (optfile) {		/* Configure the Stonith object from a file */		if ((rc=stonith_set_config_file(s, optfile)) != S_OK) {			syslog(LOG_ERR			,	"Invalid config file for %s device."			,	SwitchType);#if 0			syslog(LOG_INFO, "Config file syntax: %s"			,	s->s_ops->getinfo(s, ST_CONF_FILE_SYNTAX));#endif			stonith_delete(s); s=NULL;			exit(S_BADCONFIG);		}	}else if (parameters) {		/* Configure Stonith object from the -p argument */		StonithNVpair *		pairs;		if ((pairs = stonith1_compat_string_to_NVpair		     (	s, parameters)) == NULL) {			fprintf(stderr			,	"Invalid STONITH -p parameter [%s]\n"			,	parameters);			exit(1);		}		if ((rc = stonith_set_config(s, pairs)) != S_OK) {			fprintf(stderr			,	"Invalid config info for %s device"			,	SwitchType);		}	}else{		/*		 *	Configure STONITH device using cmdline arguments...		 */		if ((rc = stonith_set_config(s, nvargs)) != S_OK) {			const char**	names;			int		j;			fprintf(stderr			,	"Invalid config info for %s device"			,	SwitchType);			fprintf(stderr			,	"Valid config names are:\n");						names = stonith_get_confignames(s);			for (j=0; names[j]; ++j) {				fprintf(stderr				,	"\t%s\n", names[j]);			}			exit(rc);		}	}	rc = stonith_get_status(s);	if ((SwitchType = stonith_get_info(s, ST_DEVICEID)) == NULL) {		SwitchType = "BayTech";	}	if (status && !silent) {		if (rc == S_OK) {			syslog(LOG_ERR, "%s device OK.", SwitchType);		}else{			/* Uh-Oh */			syslog(LOG_ERR, "%s device not accessible."			,	SwitchType);		}	}	if (listhosts) {		char **	hostlist;		hostlist = stonith_get_hostlist(s);		if (hostlist == NULL) {			syslog(LOG_ERR, "Could not list hosts for %s."			,	SwitchType);		}else{			char **	this;			for(this=hostlist; *this; ++this) {				printf("%s\n", *this);			}			stonith_free_hostlist(hostlist);		}	}	if (optind < argc) {		char *nodename;		nodename = strdup(argv[optind]);		g_strdown(nodename);		rc = stonith_req_reset(s, reset_type, nodename);		free(nodename);	}	stonith_delete(s); s = NULL;	return(rc);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
懂色一区二区三区免费观看| 亚洲成人综合视频| 成人永久免费视频| 国产精品美女久久久久高潮| 国产精品小仙女| 久久久国际精品| 国产成人在线视频免费播放| 国产日韩av一区| 成人av在线播放网址| 中文字幕一区二区视频| 色偷偷久久一区二区三区| 亚洲免费电影在线| 欧美精品久久天天躁| 久久国产精品区| 国产日本欧洲亚洲| 一本久久a久久精品亚洲| 欧美国产欧美亚州国产日韩mv天天看完整| 制服.丝袜.亚洲.中文.综合| 免费视频一区二区| 国产欧美精品在线观看| 色综合久久久网| 五月天国产精品| 久久亚洲捆绑美女| 99久久久久久| 日韩av在线发布| 日本一区二区三区免费乱视频 | 欧美久久久久久蜜桃| 韩国理伦片一区二区三区在线播放| 国产欧美日韩综合精品一区二区| 99久久久久免费精品国产 | 中文字幕在线一区| 777欧美精品| 99re成人精品视频| 喷水一区二区三区| 国产精品理伦片| 欧美va在线播放| 在线视频你懂得一区二区三区| 看片的网站亚洲| 一区二区在线免费观看| 337p日本欧洲亚洲大胆精品| 91福利精品视频| 国产成人免费视频网站| 视频在线在亚洲| 亚洲视频一二三区| 久久噜噜亚洲综合| 51久久夜色精品国产麻豆| 不卡视频免费播放| 国产综合久久久久影院| 午夜免费欧美电影| 亚洲欧美偷拍另类a∨色屁股| 精品国产乱码久久久久久1区2区| 91成人免费在线| 成人动漫视频在线| 国产一区二区三区四区五区入口| 亚洲国产精品一区二区久久恐怖片| 国产日韩三级在线| 欧美大胆人体bbbb| 欧美电影在线免费观看| 91丝袜国产在线播放| 国产电影一区在线| 激情欧美一区二区| 日av在线不卡| 同产精品九九九| 午夜精品福利一区二区三区av | 亚洲综合图片区| 亚洲男人的天堂网| 国产欧美一区二区三区在线看蜜臀| 欧美一区二区三区在线看| 在线视频你懂得一区| 99久久99久久综合| 91在线视频播放| 99久久精品99国产精品 | 欧美在线不卡一区| 91麻豆免费观看| 91免费视频网| 色噜噜狠狠一区二区三区果冻| av一二三不卡影片| av在线不卡观看免费观看| 99这里只有精品| 色综合久久综合网欧美综合网| 成人黄色片在线观看| 99热这里都是精品| 91色在线porny| 色婷婷久久久久swag精品| 色哟哟一区二区三区| 一本色道亚洲精品aⅴ| 欧美综合一区二区三区| 在线看日本不卡| 欧美人成免费网站| 日韩美女天天操| 欧美激情一区二区三区不卡 | 国产乱码精品一区二区三区忘忧草 | 懂色中文一区二区在线播放| 粉嫩av亚洲一区二区图片| 成人91在线观看| 欧美亚洲免费在线一区| 欧美人牲a欧美精品| 精品国产乱码久久久久久1区2区| 久久久久久久久久电影| 国产精品卡一卡二| 一区二区三区日本| 日本欧美肥老太交大片| 精品一区二区久久久| 国产iv一区二区三区| 色综合色综合色综合色综合色综合| 欧美视频在线一区| 精品日韩99亚洲| 国产精品成人一区二区艾草| 亚洲成av人影院| 国产乱子伦一区二区三区国色天香| 成人免费看的视频| 欧美区在线观看| 久久久国产午夜精品| 夜夜嗨av一区二区三区网页| 日韩**一区毛片| 成人av中文字幕| 91精品国产手机| 中文欧美字幕免费| 石原莉奈一区二区三区在线观看| 狠狠色综合日日| 91丨porny丨国产入口| 91精品国产综合久久香蕉麻豆 | 国产精品成人午夜| 日本女优在线视频一区二区| 成人午夜电影久久影院| 欧美日本乱大交xxxxx| 国产色产综合产在线视频| 亚洲在线成人精品| 国产风韵犹存在线视精品| 欧美日韩精品一区二区三区 | 欧美性猛交xxxxxxxx| 久久精品一区二区三区不卡牛牛 | 欧美一区二区视频在线观看2020| 中文av字幕一区| 免费成人在线观看视频| 色老头久久综合| 国产欧美一区二区三区网站| 日韩精品亚洲一区| 色综合天天综合网国产成人综合天| 日韩欧美国产一区二区三区| √…a在线天堂一区| 国产综合色精品一区二区三区| 欧美在线视频日韩| 自拍偷自拍亚洲精品播放| 国内精品国产成人国产三级粉色| 欧美日韩中字一区| 亚洲欧美日韩一区二区三区在线观看| 韩国一区二区三区| 日韩午夜在线影院| 婷婷综合在线观看| 欧美天堂一区二区三区| 亚洲免费看黄网站| 91在线云播放| 最好看的中文字幕久久| 成人sese在线| 国产女人18毛片水真多成人如厕| 蜜桃视频一区二区三区| 欧美日韩国产小视频| 一区二区三区视频在线看| 91在线丨porny丨国产| 成人免费在线播放视频| 成人自拍视频在线| 久久精品一区二区三区不卡牛牛| 极品少妇xxxx偷拍精品少妇| 日韩一区二区在线播放| 丝袜亚洲精品中文字幕一区| 欧美亚洲国产一区二区三区va| 亚洲日本va午夜在线影院| av一区二区三区四区| 亚洲欧洲精品一区二区三区不卡| 国产69精品久久久久777| 精品国产乱码久久久久久免费 | 在线不卡的av| 日韩不卡一区二区| 日韩丝袜情趣美女图片| 日本免费在线视频不卡一不卡二 | 精品视频1区2区3区| 亚洲18色成人| 欧美精品一级二级| 免费看欧美美女黄的网站| 91精品国产入口在线| 久久草av在线| 久久久精品日韩欧美| 成人中文字幕在线| 亚洲色图在线看| 欧美日韩国产经典色站一区二区三区| 午夜精品视频一区| 精品国内二区三区| 成人性生交大片免费看在线播放| 亚洲天堂精品视频| 欧美日韩国产美| 国产在线一区二区综合免费视频| 久久精品欧美日韩| 91在线无精精品入口| 日韩主播视频在线| 久久亚洲私人国产精品va媚药| a级精品国产片在线观看| 亚洲一级电影视频| 欧美成人免费网站| 不卡电影免费在线播放一区|