Module: check_mk
Branch: master
Commit: 2385b1bbb1b28a743aa1a4d9bec5859962a8aede
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2385b1bbb1b28a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Nov 26 11:51:29 2014 +0100
win_bios, win_signature: make more compatible with Win 2003
---
inventory/win_bios | 2 +-
inventory/win_disks | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/inventory/win_bios b/inventory/win_bios
index c48f50d..c346878 100644
--- a/inventory/win_bios
+++ b/inventory/win_bios
@@ -36,7 +36,6 @@
# SMBIOSMajorVersion : 2
# SMBIOSMinorVersion : 5
-
def inv_win_bios(info):
node = inv_tree("hardware.bios.")
smbios_version = ""
@@ -56,6 +55,7 @@ def inv_win_bios(info):
# The ReleaseDate property indicates the release date of the
# Win32 BIOS in the Coordinated Universal Time (UTC) format
# of YYYYMMDDHHMMSS.MMMMMM(+-)OOO.
+ value = value.replace("*", "0")
node["date"] =
int(time.mktime(time.strptime(value.split(".")[0], "%Y%m%d%H%M%S")))
elif varname == "Manufacturer":
node["vendor"] = value
diff --git a/inventory/win_disks b/inventory/win_disks
index 4970379..7514f00 100644
--- a/inventory/win_disks
+++ b/inventory/win_disks
@@ -77,8 +77,11 @@ def inv_win_disks(info):
array["size"] = int(value)
elif varname == "MediaType":
array["type"] = value
- elif varname == "Signature" and value != '':
- array["signature"] = int(value)
+ elif varname == "Signature":
+ if value != "":
+ array["signature"] = int(value)
+ else:
+ array["signature"] = 0
array["local"] = True
node.append(array)