Module: check_mk
Branch: master
Commit: f688e87a6366b4c23b9aafcbfe52f207d64b8444
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f688e87a6366b4…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Tue Sep 15 13:57:44 2015 +0200
#2624 FIX fixed vbscript based inventory script (windows) only sending updated data every
39 years
---
.werks/2624 | 9 +++++++++
ChangeLog | 1 +
agents/windows/plugins/mk_inventory.vbs | 5 ++---
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/.werks/2624 b/.werks/2624
new file mode 100644
index 0000000..aebfa85
--- /dev/null
+++ b/.werks/2624
@@ -0,0 +1,9 @@
+Title: fixed vbscript based inventory script (windows) only sending updated data every 39
years
+Level: 1
+Component: inv
+Compatible: compat
+Version: 1.2.7i3
+Date: 1442318089
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 68a2268..63ebbf5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -293,6 +293,7 @@
* 2454 FIX: lnx_distro: Fixed inventory for SuSE installations with patchlevel 0
* 2541 FIX: Round last state change of network interfaces to one day, avoid history
spam...
* 2553 FIX: solaris_prtdiag: Can now handle Supermicro servers using Solaris 10
+ * 2624 FIX: fixed vbscript based inventory script (windows) only sending updated data
every 39 years
1.2.7i2:
diff --git a/agents/windows/plugins/mk_inventory.vbs
b/agents/windows/plugins/mk_inventory.vbs
index 4b590df..8e480ea 100644
--- a/agents/windows/plugins/mk_inventory.vbs
+++ b/agents/windows/plugins/mk_inventory.vbs
@@ -37,9 +37,8 @@ timestamp = state_dir & "\mk_inventory." &
remote_host
If (fso.FileExists(timestamp)) Then
Set objTimestamp = fso.GetFile(timestamp)
fileDate = objTimestamp.DateLastModified
- earlier = Now - delay
- ' exit if timestamp to young
- If filedate > earlier Then
+ ' exit if timestamp is too young
+ If DateAdd("s", delay, filedate) >= Now Then
WScript.Quit
End If
End If