mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-11 02:57:22 +00:00
'Skywing' 11/27/08 patch to add an IPMI_KGKEY environmental variable accessible from the command line; I added usage info as well
This commit is contained in:
parent
63eaecf469
commit
be5db2df38
@ -73,7 +73,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_ALL_OPTIONS
|
#ifdef ENABLE_ALL_OPTIONS
|
||||||
# define OPTION_STRING "I:hVvcgsEao:H:d:P:f:U:p:C:L:A:t:T:m:S:l:b:B:e:k:O:"
|
# define OPTION_STRING "I:hVvcgsEKao:H:d:P:f:U:p:C:L:A:t:T:m:S:l:b:B:e:k:O:"
|
||||||
#else
|
#else
|
||||||
# define OPTION_STRING "I:hVvcH:f:U:p:d:S:"
|
# define OPTION_STRING "I:hVvcH:f:U:p:d:S:"
|
||||||
#endif
|
#endif
|
||||||
@ -235,6 +235,7 @@ ipmi_option_usage(const char * progname, struct ipmi_cmd * cmdlist, struct ipmi_
|
|||||||
lprintf(LOG_NOTICE, " -A authtype Force use of auth type NONE, PASSWORD, MD2, MD5 or OEM");
|
lprintf(LOG_NOTICE, " -A authtype Force use of auth type NONE, PASSWORD, MD2, MD5 or OEM");
|
||||||
lprintf(LOG_NOTICE, " -P password Remote session password");
|
lprintf(LOG_NOTICE, " -P password Remote session password");
|
||||||
lprintf(LOG_NOTICE, " -E Read password from IPMI_PASSWORD environment variable");
|
lprintf(LOG_NOTICE, " -E Read password from IPMI_PASSWORD environment variable");
|
||||||
|
lprintf(LOG_NOTICE, " -K Read kgkey from IPMI_KGKEY environment variable");
|
||||||
lprintf(LOG_NOTICE, " -m address Set local IPMB address");
|
lprintf(LOG_NOTICE, " -m address Set local IPMB address");
|
||||||
lprintf(LOG_NOTICE, " -b channel Set destination channel for bridged request");
|
lprintf(LOG_NOTICE, " -b channel Set destination channel for bridged request");
|
||||||
lprintf(LOG_NOTICE, " -t address Bridge request to remote target address");
|
lprintf(LOG_NOTICE, " -t address Bridge request to remote target address");
|
||||||
@ -386,6 +387,21 @@ ipmi_main(int argc, char ** argv,
|
|||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'K':
|
||||||
|
if ((tmp = getenv("IPMI_KGKEY")))
|
||||||
|
{
|
||||||
|
if (kgkey)
|
||||||
|
free(kgkey);
|
||||||
|
kgkey = strdup(tmp);
|
||||||
|
if (kgkey == NULL) {
|
||||||
|
lprintf(LOG_ERR, "%s: malloc failure", progname);
|
||||||
|
goto out_free;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
lprintf(LOG_WARN, "Unable to read kgkey from environment");
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'U':
|
case 'U':
|
||||||
username = strdup(optarg);
|
username = strdup(optarg);
|
||||||
if (username == NULL) {
|
if (username == NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user