freeipmi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Freeipmi-devel] FreeIPMI on unsupported Box


From: Ricky James Allam
Subject: [Freeipmi-devel] FreeIPMI on unsupported Box
Date: Wed, 20 May 2009 15:30:15 +0800

Hello,

I've been using FreeIPMI on several boxes (HP, IBM, and some others).
On IPMI-unsupported boxes, the tools are unresponsive without any
message at all. I've made the following ugly function to simply exit
if the board is not IPMI compliant inserting it in one of the tools,
and displays such useful message like below. While administrators
should know when to use this package, it is advantageous too to have a
similar mechanism especially when the package is integrated in an
application that could run on any platform. Is there a better way to
do this?
Pls do let me know.

Example,

fbsd71r-rjavm64# uname -a
FreeBSD fbsd71r-rjavm64 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan  1
08:58:24 UTC 2009
address@hidden:/usr/obj/usr/src/sys/GENERIC  amd64


In bmc-watchdog.c,

...
/*
0: supported
1: unsuported
*/

static int
is_ipmi_not_supported()
{
  int ret = 0;
  ret = system("/usr/local/sbin/dmidecode | /usr/bin/grep IPMI");
  return ret;
}
...

int
main(int argc, char **argv)
{
  _err_init(argv[0]);

  if(is_ipmi_not_supported());
  {
    printf("IPMI is not supported on this machine. bmc-watchdog exiting...\n
    exit(1);
  }

  ipmi_disable_coredump();

...
}

Thank you very much.

Ricky James Allam




reply via email to

[Prev in Thread] Current Thread [Next in Thread]