Fix fusinv_servers var name in audit

This commit is contained in:
Daniel Berteaud 2018-12-08 14:39:43 +01:00
parent c2111c337b
commit 911b7dc80f
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
package : fws-fusioninventory package : fws-fusioninventory
version : 2.4.2-8 version : 2.4.2-9
architecture : all architecture : all
section : base section : base
priority : optional priority : optional

View File

@ -84,8 +84,8 @@ def audit():
print(r"key HKEY_LOCAL_MACHINE\SOFTWARE\FusionInventory-Agent\server doesn't exist") print(r"key HKEY_LOCAL_MACHINE\SOFTWARE\FusionInventory-Agent\server doesn't exist")
return "ERROR" return "ERROR"
val_server = registry_readstring(HKEY_LOCAL_MACHINE,makepath('SOFTWARE','FusionInventory-Agent'),'server') val_server = registry_readstring(HKEY_LOCAL_MACHINE,makepath('SOFTWARE','FusionInventory-Agent'),'server')
if val_server != variables['fusinv_server'] : if val_server != variables['fusinv_servers'] :
print("server config is not %, it's % instead" % (variables['fusinv_server'], val_server) ) print("server config is not %, it's % instead" % (variables['fusinv_servers'], val_server) )
return "WARNING" return "WARNING"
if 'fusinv_user' in variables and 'fusinv_pass' in variables: if 'fusinv_user' in variables and 'fusinv_pass' in variables:
if not registry_readstring(HKEY_LOCAL_MACHINE,makepath('SOFTWARE','FusionInventory-Agent'),'user'): if not registry_readstring(HKEY_LOCAL_MACHINE,makepath('SOFTWARE','FusionInventory-Agent'),'user'):