support IPMI_PASSWORD as well

This commit is contained in:
Duncan Laurie 2004-03-27 06:38:47 +00:00
parent 6bc047da44
commit d47cd125fe

View File

@ -83,7 +83,7 @@ void usage(void)
printf(" -p port Remote RMCP port (default is 623)\n");
printf(" -U username Remote username\n");
printf(" -a Prompt for remote password\n");
printf(" -E Read remote password from environment variable IPMITOOL_PASSWORD\n");
printf(" -E Read remote password from environment variable IPMI_PASSWORD\n");
printf(" -P password Remote password\n");
printf(" -I intf Inteface to use\n");
printf("\n\n");
@ -313,6 +313,13 @@ int main(int argc, char ** argv)
password = strdup (tmp);
}
else if ((tmp = getenv("IPMI_PASSWORD")))
{
if (password)
free (password);
password = strdup (tmp);
}
break;
case 'a':