[-]
[+]
|
Changed |
_service:set_version:inventory-system.spec
|
|
[-]
[+]
|
Changed |
inventory-system.spec
^
|
|
[-]
[+]
|
Changed |
_service:recompress:tar_scm:inventory-system-0.0.rev1619.tar.bz2/client/inventory-system.sh
^
|
@@ -1,8 +1,8 @@
#!/bin/bash
# Inventory System
# Author: Carsten Schoene
-# $LastChangedDate: 2012-07-10 16:33:56 +0200 (Tue, 10 Jul 2012) $
-# $Rev: 1541 $
+# $LastChangedDate: 2012-07-20 17:07:50 +0200 (Fri, 20 Jul 2012) $
+# $Rev: 1618 $
#
# Default options (can be changed by inventory-system.conf)
DEBUG="yes"
@@ -36,6 +36,8 @@
rpm
ls
date
+modprobe
+ipmitool
"
# mail alerts / debug messages
@@ -253,6 +255,38 @@
get_system_default_interface_ip_from_int `get_system_default_interface`
}
+# get ipmi mac
+function get_system_mgmt_mac {
+ ${MODPROBE} ipmi_devintf 2>/dev/null
+ ${MODPROBE} ipmi_si 2>/dev/null
+ ${IPMITOOL} lan print 1 2>&1 >/dev/null
+ if [ $? == 0 ] ; then
+ MAC=`${IPMITOOL} lan print 1 | ${GREP} -E '(^MAC Address)' | ${AWK} '{print tolower($NF)}' | \
+ ${GREP} -i -E '([0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2}:[0-9a-f]{2})'`
+ fi
+ if [ -z "${MAC}" ] ; then
+ MAC="none"
+ fi
+ debug "SYSTEM-MGMT-MAC: ${MAC}"
+ echo ${MAC}
+}
+
+# get ipmi ip
+function get_system_mgmt_ip {
+ ${MODPROBE} ipmi_devintf 2>/dev/null
+ ${MODPROBE} ipmi_si 2>/dev/null
+ ${IPMITOOL} lan print 1 2>&1 >/dev/null
+ if [ $? == 0 ] ; then
+ IP=`${IPMITOOL} lan print 1 | ${GREP} -E '(^IP Address) ' | ${AWK} '{print $NF}'`
+ fi
+ if [ -z "${IP}" ] ; then
+ IP="none"
+ fi
+ debug "SYSTEM-MGMT-IP: ${IP}"
+ echo ${IP}
+
+}
+
# get rpm package list
function get_system_software {
PACKAGES=`${RPM} -qa --queryformat '%{name}-%{version}-%{release}.%{arch} '`
@@ -322,6 +356,8 @@
get_system_ipv4 \
get_system_ipv6 \
get_system_hostname \
+ get_system_mgmt_mac \
+ get_system_mgmt_ip \
get_system_type \
get_system_kernelversion \
get_system_arch \
|
[-]
[+]
|
Added |
_service:recompress:tar_scm:inventory-system-0.0.rev1619.tar.bz2/server/config-custom.inc.php
^
|
@@ -0,0 +1,5 @@
+<?php
+
+$config["isdf"]["custom_postvars"] = array();
+
+?>
|
[-]
[+]
|
Changed |
_service:recompress:tar_scm:inventory-system-0.0.rev1619.tar.bz2/server/config.inc.php
^
|
@@ -1,17 +1,5 @@
<?php
-$config["isdf"]["postvars"] = array("get_system_uuid","get_system_serial","get_system_cpu","get_system_memory","get_system_manufacturer","get_system_productname","get_system_biosversion","get_system_net_info","get_system_default_ip","get_system_ipv4","get_system_ipv6","get_system_hostname","get_system_type","get_system_kernelversion","get_system_arch","get_system_os","get_system_software","get_system_date");
-
-$config["isdf"]["custom_postvars"] = array();
-
-$config["isdf"]["db"]['phptype'] = "mysql";
-$config["isdf"]["db"]['protocol'] = "tcp";
-$config["isdf"]["db"]['hostspec'] = "";
-$config["isdf"]["db"]['database'] = "";
-$config["isdf"]["db"]['username'] = "";
-$config["isdf"]["db"]['password'] = "";
-$config["isdf"]["db"]['new_link'] = true;
-$config['mdb2']['options'] = array();
-
+$config["isdf"]["postvars"] = array("get_system_uuid","get_system_serial","get_system_cpu","get_system_memory","get_system_manufacturer","get_system_productname","get_system_biosversion","get_system_net_info","get_system_default_ip","get_system_ipv4","get_system_ipv6","get_system_hostname","get_system_mgmt_mac","get_system_mgmt_ip","get_system_type","get_system_kernelversion","get_system_arch","get_system_os","get_system_software","get_system_date");
?>
|
[-]
[+]
|
Added |
_service:recompress:tar_scm:inventory-system-0.0.rev1619.tar.bz2/server/db.inc.php
^
|
@@ -0,0 +1,12 @@
+<?php
+
+$config["isdf"]["db"]['phptype'] = "mysql";
+$config["isdf"]["db"]['protocol'] = "tcp";
+$config["isdf"]["db"]['hostspec'] = "";
+$config["isdf"]["db"]['database'] = "";
+$config["isdf"]["db"]['username'] = "";
+$config["isdf"]["db"]['password'] = "";
+$config["isdf"]["db"]['new_link'] = true;
+$config['mdb2']['options'] = array();
+
+?>
|
[-]
[+]
|
Changed |
_service:recompress:tar_scm:inventory-system-0.0.rev1619.tar.bz2/server/isdf.php
^
|
@@ -3,8 +3,8 @@
// isdf - inventory system deployment feed
// Author: Carsten Schoene
//
-// $LastChangedDate: 2012-07-06 21:46:15 +0200 (Fri, 06 Jul 2012) $
-// $Rev: 1530 $
+// $LastChangedDate: 2012-07-20 21:09:25 +0200 (Fri, 20 Jul 2012) $
+// $Rev: 1619 $
*/
// define our name
@@ -24,6 +24,8 @@
define('BASE',dirname(__FILE__));
require_once("MDB2.php");
require_once(BASE . "/config.inc.php");
+require_once(BASE . "/config-custom.inc.php");
+require_once(BASE . "/db.inc.php");
// initialize variables
$request_complete=1;
|
[-]
[+]
|
Changed |
_service:recompress:tar_scm:inventory-system-0.0.rev1619.tar.bz2/server/status.php
^
|
@@ -3,8 +3,8 @@
// isdf - inventory system webstatus
// Author: Carsten Schoene
//
-// $LastChangedDate: 2012-07-07 20:43:56 +0200 (Sat, 07 Jul 2012) $
-// $Rev: 1533 $
+// $LastChangedDate: 2012-07-20 21:09:25 +0200 (Fri, 20 Jul 2012) $
+// $Rev: 1619 $
*/
// define our name
@@ -24,6 +24,8 @@
define('BASE',dirname(__FILE__));
require_once("MDB2.php");
require_once(BASE . "/config.inc.php");
+require_once(BASE . "/config-custom.inc.php");
+require_once(BASE . "/db.inc.php");
echo '<html><head>
<title>inventory system - status web</title>
|