From: jparsons@sourceware.org <jparsons@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/fence/agents/ipmilan ipmilan.c
Date: 10 Jan 2007 23:47:31 -0000 [thread overview]
Message-ID: <20070110234731.25564.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL50
Changes by: jparsons at sourceware.org 2007-01-10 23:47:31
Modified files:
fence/agents/ipmilan: ipmilan.c
Log message:
bz222234
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/fence/agents/ipmilan/ipmilan.c.diff?cvsroot=cluster&only_with_tag=RHEL50&r1=1.8&r2=1.8.4.1
--- cluster/fence/agents/ipmilan/ipmilan.c 2006/08/15 18:37:04 1.8
+++ cluster/fence/agents/ipmilan/ipmilan.c 2007/01/10 23:47:30 1.8.4.1
@@ -91,6 +91,7 @@
pid_t i_pid;
int i_config;
int i_verbose;
+ int i_lanplus;
};
@@ -175,8 +176,13 @@
int x;
/* Store path */
- snprintf(cmd, sizeof(cmd), "%s -I lan -H %s", ipmi->i_ipmitool,
- ipmi->i_host);
+ if (ipmi->i_lanplus) {
+ snprintf(cmd, sizeof(cmd), "%s -I lanplus -H %s",
+ ipmi->i_ipmitool, ipmi->i_host);
+ } else {
+ snprintf(cmd, sizeof(cmd), "%s -I lan -H %s", ipmi->i_ipmitool,
+ ipmi->i_host);
+ }
if (ipmi->i_user) {
snprintf(arg, sizeof(arg), " -U %s", ipmi->i_user);
@@ -456,7 +462,7 @@
*/
static struct ipmi *
ipmi_init(struct ipmi *i, char *host, char *authtype,
- char *user, char *password, int verbose)
+ char *user, char *password, int lanplus, int verbose)
{
const char *p;
@@ -526,6 +532,7 @@
i->i_pid = -1;
i->i_id = IPMIID;
i->i_verbose = verbose;
+ i->i_lanplus = lanplus;
return i;
}
@@ -570,7 +577,7 @@
}
memset((void *)i, 0, sizeof(*i));
- ipmi_init(i, NULL, NULL, NULL, NULL, 0);
+ ipmi_init(i, NULL, NULL, NULL, NULL, 0, 0);
return i;
}
@@ -699,7 +706,7 @@
user = NULL;
/* IPMI auth type not supported on RHEL3 */
- i = ipmi_init(i, host, NULL, user, passwd, 0);
+ i = ipmi_init(i, host, NULL, user, passwd, 0, 0);
if (!i)
return S_OOPS;
i->i_config = 1;
@@ -804,7 +811,7 @@
char *passwd, size_t pwlen,
char *user, size_t userlen,
char *op, size_t oplen,
- int *verbose)
+ int *lanplus, int *verbose)
{
char in[256];
int line = 0;
@@ -860,6 +867,8 @@
else
user[0] = 0;
+ } else if (!strcasecmp(name, "lanplus")) {
+ (*lanplus) = 1;
} else if (!strcasecmp(name, "option") ||
!strcasecmp(name, "operation") ||
!strcasecmp(name, "action")) {
@@ -923,6 +932,7 @@
char passwd[64];
char user[64];
char op[64];
+ int lanplus=0;
int verbose=0;
char *pname = basename(argv[0]);
struct ipmi *i;
@@ -937,7 +947,7 @@
/*
Parse command line options if any were specified
*/
- while ((opt = getopt(argc, argv, "A:a:i:l:p:o:vV?hH")) != EOF) {
+ while ((opt = getopt(argc, argv, "A:a:i:l:p:Po:vV?hH")) != EOF) {
switch(opt) {
case 'A':
/* Auth type */
@@ -956,6 +966,9 @@
/* password */
strncpy(passwd, optarg, sizeof(passwd));
break;
+ case 'P':
+ lanplus = 1;
+ break;
case 'o':
/* Operation */
strncpy(op, optarg, sizeof(op));
@@ -982,7 +995,7 @@
authtype, sizeof(authtype),
passwd, sizeof(passwd),
user, sizeof(user),
- op, sizeof(op), &verbose) != 0)
+ op, sizeof(op), &lanplus, &verbose) != 0)
return 1;
}
@@ -1011,7 +1024,7 @@
/* Ok, set up the IPMI struct */
- i = ipmi_init(NULL, ip, authtype, user, passwd, verbose);
+ i = ipmi_init(NULL, ip, authtype, user, passwd, lanplus, verbose);
if (!i)
fail_exit("Failed to initialize\n");
next reply other threads:[~2007-01-10 23:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-10 23:47 jparsons [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-09-24 21:56 [Cluster-devel] cluster/fence/agents/ipmilan ipmilan.c rmccabe
2007-09-12 14:54 jparsons
2007-06-26 19:52 lhh
2007-01-29 20:43 rohara
2007-01-29 20:34 rohara
2007-01-29 20:33 rohara
2007-01-29 20:31 rohara
2007-01-10 23:46 jparsons
2007-01-10 23:45 jparsons
2006-08-15 18:37 teigland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070110234731.25564.qmail@sourceware.org \
--to=jparsons@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.