You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating system : Debian Stretch
Perl version :5.24.1
OCS Inventory informations
Unix agent version : 2.4.1
Problem's description
I've been upgrading our systems to use 2.4.1 manually (because Debian stable still only has an old package) and am utterly enjoying the postinst.pl script but ran into a small conceptual issue. If you specify the --configdir parameter it works fine and creates the right files in the right place. Unfortunately though, it's not aware of the agent's behaviour when it's looking for its config files and doesn't remove configs from locations the agent will look for first. Effectively alternate paths/configs never get seen if they're lower down the pecking order of paths the agent looks in.
Given the coding in the script, might I suggest it makes more use of the ordering of the search path array (ie my @default_configdirs = "/etc/ocsinventory", "/usr/local/etc/ocsinventory", "/etc/ocsinventory-agent")?
Theoretically, when you match the --configdir to it, it should be fairly easy to work backwards from that point in the array and "move" higher priority config files down to the new location if needed. By taking advantage of clobbering you'd hopefully end up with a nicely migrated single config file where you expect it to be and simultaneously remove the configs the agent keeps finding (I hope!)
Sorry! That might need more explaining! - So I just edited this :-)
Regards,
Keith
Inventory log file ( optional )
Use github cloud or trusted upload website
The text was updated successfully, but these errors were encountered:
General informations
Operating system : Debian Stretch
Perl version :5.24.1
OCS Inventory informations
Unix agent version : 2.4.1
Problem's description
I've been upgrading our systems to use 2.4.1 manually (because Debian stable still only has an old package) and am utterly enjoying the postinst.pl script but ran into a small conceptual issue. If you specify the --configdir parameter it works fine and creates the right files in the right place. Unfortunately though, it's not aware of the agent's behaviour when it's looking for its config files and doesn't remove configs from locations the agent will look for first. Effectively alternate paths/configs never get seen if they're lower down the pecking order of paths the agent looks in.
Given the coding in the script, might I suggest it makes more use of the ordering of the search path array (ie my @default_configdirs = "/etc/ocsinventory", "/usr/local/etc/ocsinventory", "/etc/ocsinventory-agent")?
Theoretically, when you match the --configdir to it, it should be fairly easy to work backwards from that point in the array and "move" higher priority config files down to the new location if needed. By taking advantage of clobbering you'd hopefully end up with a nicely migrated single config file where you expect it to be and simultaneously remove the configs the agent keeps finding (I hope!)
Sorry! That might need more explaining! - So I just edited this :-)
Regards,
Keith
Inventory log file ( optional )
Use github cloud or trusted upload website
The text was updated successfully, but these errors were encountered: