forked from pool/ipmitool
This commit is contained in:
parent
aa706c4f3f
commit
8645c6b961
30
ipmitool-POH-scale
Normal file
30
ipmitool-POH-scale
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
--- ipmitool-1.8.9/lib/ipmi_chassis.c.orig 2007-02-22 09:38:56.000000000 +0100
|
||||||
|
+++ ipmitool-1.8.9/lib/ipmi_chassis.c 2008-01-17 15:07:23.000000000 +0100
|
||||||
|
@@ -189,6 +189,8 @@ ipmi_chassis_poh(struct ipmi_intf * intf
|
||||||
|
struct ipmi_rs * rsp;
|
||||||
|
struct ipmi_rq req;
|
||||||
|
uint32_t count;
|
||||||
|
+ unsigned long hcount;
|
||||||
|
+ unsigned char minutes, scale;
|
||||||
|
|
||||||
|
memset(&req, 0, sizeof(req));
|
||||||
|
req.msg.netfn = IPMI_NETFN_CHASSIS;
|
||||||
|
@@ -206,9 +208,16 @@ ipmi_chassis_poh(struct ipmi_intf * intf
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy(&count, rsp->data+1, 4);
|
||||||
|
+#if WORDS_BIGENDIAN
|
||||||
|
+ count = BSWAP_32(count);
|
||||||
|
+#endif
|
||||||
|
+ scale = rsp->data[0];
|
||||||
|
+ hcount = count * scale;
|
||||||
|
+ minutes = hcount % 60;
|
||||||
|
+ hcount /= 60;
|
||||||
|
|
||||||
|
- printf("POH Counter : %li hours total (%li days, %li hours)\n",
|
||||||
|
- (long)count, (long)(count / 24), (long)(count % 24));
|
||||||
|
+ printf("POH Counter : %li hours total (%li days, %lih%02d')\n",
|
||||||
|
+ (long)hcount, (long)(hcount / 24), (long)(hcount % 24), minutes);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
92
ipmitool-lan-set.patch
Normal file
92
ipmitool-lan-set.patch
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
--- ipmitool-1.8.9/lib/ipmi_lanp.c 2007-07-18 14:47:43.822052004 -0500
|
||||||
|
+++ ipmitool-1.8.9/lib/ipmi_lanp.c 2007-07-19 09:56:31.567441299 -0500
|
||||||
|
@@ -1489,28 +1489,49 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* ip address */
|
||||||
|
- else if ((strncmp(argv[1], "ipaddr", 6) == 0) &&
|
||||||
|
- (get_cmdline_ipaddr(argv[2], data) == 0)) {
|
||||||
|
- printf("Setting LAN %s to %d.%d.%d.%d\n",
|
||||||
|
- ipmi_lan_params[IPMI_LANP_IP_ADDR].desc,
|
||||||
|
- data[0], data[1], data[2], data[3]);
|
||||||
|
- rc = set_lan_param(intf, chan, IPMI_LANP_IP_ADDR, data, 4);
|
||||||
|
+ else if (strncmp(argv[1], "ipaddr", 6) == 0) {
|
||||||
|
+ if(argc != 3)
|
||||||
|
+ {
|
||||||
|
+ ipmi_lan_set_usage();
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ rc = get_cmdline_ipaddr(argv[2], data);
|
||||||
|
+ if (rc == 0) {
|
||||||
|
+ printf("Setting LAN %s to %d.%d.%d.%d\n",
|
||||||
|
+ ipmi_lan_params[IPMI_LANP_IP_ADDR].desc,
|
||||||
|
+ data[0], data[1], data[2], data[3]);
|
||||||
|
+ rc = set_lan_param(intf, chan, IPMI_LANP_IP_ADDR, data, 4);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
/* network mask */
|
||||||
|
- else if ((strncmp(argv[1], "netmask", 7) == 0) &&
|
||||||
|
- (get_cmdline_ipaddr(argv[2], data) == 0)) {
|
||||||
|
- printf("Setting LAN %s to %d.%d.%d.%d\n",
|
||||||
|
- ipmi_lan_params[IPMI_LANP_SUBNET_MASK].desc,
|
||||||
|
- data[0], data[1], data[2], data[3]);
|
||||||
|
- rc = set_lan_param(intf, chan, IPMI_LANP_SUBNET_MASK, data, 4);
|
||||||
|
+ else if (strncmp(argv[1], "netmask", 7) == 0) {
|
||||||
|
+ if(argc != 3)
|
||||||
|
+ {
|
||||||
|
+ ipmi_lan_set_usage();
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ rc = get_cmdline_ipaddr(argv[2], data);
|
||||||
|
+ if (rc == 0) {
|
||||||
|
+ printf("Setting LAN %s to %d.%d.%d.%d\n",
|
||||||
|
+ ipmi_lan_params[IPMI_LANP_SUBNET_MASK].desc,
|
||||||
|
+ data[0], data[1], data[2], data[3]);
|
||||||
|
+ rc = set_lan_param(intf, chan, IPMI_LANP_SUBNET_MASK, data, 4);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
/* mac address */
|
||||||
|
- else if ((strncmp(argv[1], "macaddr", 7) == 0) &&
|
||||||
|
- (get_cmdline_macaddr(argv[2], data) == 0)) {
|
||||||
|
- printf("Setting LAN %s to %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||||
|
- ipmi_lan_params[IPMI_LANP_MAC_ADDR].desc,
|
||||||
|
- data[0], data[1], data[2], data[3], data[4], data[5]);
|
||||||
|
- rc = set_lan_param(intf, chan, IPMI_LANP_MAC_ADDR, data, 6);
|
||||||
|
+ else if (strncmp(argv[1], "macaddr", 7) == 0) {
|
||||||
|
+ if(argc != 3)
|
||||||
|
+ {
|
||||||
|
+ ipmi_lan_set_usage();
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ rc = get_cmdline_macaddr(argv[2], data);
|
||||||
|
+ if (rc == 0) {
|
||||||
|
+ printf("Setting LAN %s to %02x:%02x:%02x:%02x:%02x:%02x\n",
|
||||||
|
+ ipmi_lan_params[IPMI_LANP_MAC_ADDR].desc,
|
||||||
|
+ data[0], data[1], data[2], data[3], data[4], data[5]);
|
||||||
|
+ rc = set_lan_param(intf, chan, IPMI_LANP_MAC_ADDR, data, 6);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
/* default gateway settings */
|
||||||
|
else if (strncmp(argv[1], "defgw", 5) == 0) {
|
||||||
|
@@ -1531,6 +1552,10 @@
|
||||||
|
data[0], data[1], data[2], data[3], data[4], data[5]);
|
||||||
|
rc = set_lan_param(intf, chan, IPMI_LANP_DEF_GATEWAY_MAC, data, 6);
|
||||||
|
}
|
||||||
|
+ else {
|
||||||
|
+ ipmi_lan_set_usage();
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
/* backup gateway settings */
|
||||||
|
else if (strncmp(argv[1], "bakgw", 5) == 0) {
|
||||||
|
@@ -1551,6 +1576,10 @@
|
||||||
|
data[0], data[1], data[2], data[3], data[4], data[5]);
|
||||||
|
rc = set_lan_param(intf, chan, IPMI_LANP_BAK_GATEWAY_MAC, data, 6);
|
||||||
|
}
|
||||||
|
+ else {
|
||||||
|
+ ipmi_lan_set_usage();
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
else if (strncasecmp(argv[1], "vlan", 4) == 0) {
|
||||||
|
if (argc < 4 || strncmp(argv[2], "help", 4) == 0) {
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jan 17 15:28:30 CET 2008 - duwe@suse.de
|
||||||
|
|
||||||
|
- Fix bugs 298222 and 144023 (arg checking and POH scaling)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Mar 8 12:58:37 CET 2007 - duwe@suse.de
|
Thu Mar 8 12:58:37 CET 2007 - duwe@suse.de
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package ipmitool (Version 1.8.9)
|
# spec file for package ipmitool (Version 1.8.9)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
# This file and all modifications and additions to the pristine
|
# This file and all modifications and additions to the pristine
|
||||||
# package are under the same license as the package itself.
|
# package are under the same license as the package itself.
|
||||||
#
|
#
|
||||||
@ -12,14 +12,16 @@
|
|||||||
|
|
||||||
Name: ipmitool
|
Name: ipmitool
|
||||||
BuildRequires: openssl-devel readline-devel
|
BuildRequires: openssl-devel readline-devel
|
||||||
URL: http://ipmitool.sourceforge.net/
|
Url: http://ipmitool.sourceforge.net/
|
||||||
Summary: Utility for IPMI Control
|
Summary: Utility for IPMI Control
|
||||||
Version: 1.8.9
|
Version: 1.8.9
|
||||||
Release: 2
|
Release: 54
|
||||||
License: BSD License and BSD-like
|
License: BSD 3-Clause
|
||||||
Group: System/Management
|
Group: System/Management
|
||||||
Source: http://heanet.dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2
|
Source: http://heanet.dl.sourceforge.net/sourceforge/%{name}/%{name}-%{version}.tar.bz2
|
||||||
Patch: compile-fixes
|
Patch: compile-fixes
|
||||||
|
Patch1: ipmitool-lan-set.patch
|
||||||
|
Patch2: ipmitool-POH-scale
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -43,6 +45,8 @@ and setting LAN configuration, and chassis power control.
|
|||||||
%prep
|
%prep
|
||||||
%setup
|
%setup
|
||||||
%patch -p1
|
%patch -p1
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
CFLAGS="$RPM_OPT_FLAGS" ./configure \
|
CFLAGS="$RPM_OPT_FLAGS" ./configure \
|
||||||
@ -74,15 +78,17 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%doc %{_mandir}/man8/*
|
%doc %{_mandir}/man8/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Mar 08 2007 - duwe@suse.de
|
* Thu Jan 17 2008 duwe@suse.de
|
||||||
|
- Fix bugs 298222 and 144023 (arg checking and POH scaling)
|
||||||
|
* Thu Mar 08 2007 duwe@suse.de
|
||||||
- add new compile fixes
|
- add new compile fixes
|
||||||
* Wed Mar 07 2007 - duwe@suse.de
|
* Wed Mar 07 2007 duwe@suse.de
|
||||||
- update to 1.8.9, fixing ipmievd crashing.
|
- update to 1.8.9, fixing ipmievd crashing.
|
||||||
This was requesten in Bug#246456
|
This was requesten in Bug#246456
|
||||||
* Fri Oct 13 2006 - duwe@suse.de
|
* Fri Oct 13 2006 duwe@suse.de
|
||||||
- update to today's CVS state
|
- update to today's CVS state
|
||||||
* might fix SoL issues (Fate #30911)
|
* might fix SoL issues (Fate #30911)
|
||||||
* Tue Oct 10 2006 - duwe@suse.de
|
* Tue Oct 10 2006 duwe@suse.de
|
||||||
- update to 1.8.8 mainly various fixes:
|
- update to 1.8.8 mainly various fixes:
|
||||||
version 1.8.8
|
version 1.8.8
|
||||||
* Fix segfaults in sensor data repository list
|
* Fix segfaults in sensor data repository list
|
||||||
@ -110,13 +116,13 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
* Fix gcc4 compile warnings
|
* Fix gcc4 compile warnings
|
||||||
* Make ipmievd generate pidfile
|
* Make ipmievd generate pidfile
|
||||||
* Add initscripts for ipmievd
|
* Add initscripts for ipmievd
|
||||||
* Mon May 29 2006 - kukuk@suse.de
|
* Mon May 29 2006 kukuk@suse.de
|
||||||
- Fix type conversion bug in ipmi_pef.c [#173658]
|
- Fix type conversion bug in ipmi_pef.c [#173658]
|
||||||
* Fri May 26 2006 - schwab@suse.de
|
* Fri May 26 2006 schwab@suse.de
|
||||||
- Add readline-devel to BuildRequires to enable shell command.
|
- Add readline-devel to BuildRequires to enable shell command.
|
||||||
- Fix use of channel_info bitfield.
|
- Fix use of channel_info bitfield.
|
||||||
- Fix byte swapping.
|
- Fix byte swapping.
|
||||||
* Mon Feb 13 2006 - kukuk@suse.de
|
* Mon Feb 13 2006 kukuk@suse.de
|
||||||
- Update to ipmitool 1.8.6 [#134708,#131823]
|
- Update to ipmitool 1.8.6 [#134708,#131823]
|
||||||
- Fix memory corruption when sending encrypted SOL traffic
|
- Fix memory corruption when sending encrypted SOL traffic
|
||||||
- Add keepalive timer to IPMIv2 SOL sessions
|
- Add keepalive timer to IPMIv2 SOL sessions
|
||||||
@ -129,11 +135,11 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
- Add support for command bridging over lan and lanplus interfaces
|
- Add support for command bridging over lan and lanplus interfaces
|
||||||
- New 'chassis selftest' command
|
- New 'chassis selftest' command
|
||||||
- Many bufxies and patches from contributors
|
- Many bufxies and patches from contributors
|
||||||
* Wed Jan 25 2006 - mls@suse.de
|
* Wed Jan 25 2006 mls@suse.de
|
||||||
- converted neededforbuild to BuildRequires
|
- converted neededforbuild to BuildRequires
|
||||||
* Fri Jan 20 2006 - schwab@suse.de
|
* Fri Jan 20 2006 schwab@suse.de
|
||||||
- Don't strip binaries.
|
- Don't strip binaries.
|
||||||
* Mon Sep 19 2005 - kukuk@suse.de
|
* Mon Sep 19 2005 kukuk@suse.de
|
||||||
- Fix missing return value
|
- Fix missing return value
|
||||||
* Thu Aug 04 2005 - kukuk@suse.de
|
* Thu Aug 04 2005 kukuk@suse.de
|
||||||
- Initial release (FeatureID #165)
|
- Initial release (FeatureID #165)
|
||||||
|
Loading…
Reference in New Issue
Block a user