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 : Ubuntu 20.04, 22.04, 24.04
Perl version : v5.30.0 (version do not really matter)
OCS Inventory informations
Unix agent version : 2.10.4
Problem's description
When the ocsinventory-agent DEB package is upgraded, either from the CLI (e.g. with apt or apt-get commands) or from the GUI (e.g. with Ubuntu's "Gestionnaire de mises à jour" app), the package asks Do you want to configure the agent, and if the user answer with y, then the original configuration is lost.
The problem is also most present when upgrading from the GUI app, as the prompt is hidden in the "Details" section that needs to be manually unfolded in order to provide an answer. Otherwise, the update will not finish and the package will ends up in iF status (installed / half-configured).
I see that the DEB postinst script (ocsinventory-agent.postinst) do not prompt for reconfiguration (by forcing --nowizard option) when the DEBIAN_FRONTEND env var is set to noninteractive.
However, in my case, when the user performs the upgrade on its own, this condition is not met, so the user gets the prompt, and end up with a misconfigured agent.
Maybe the postinst script could also use a flag on the filesystem (e.g. /etc/ocsinventory-agent/.nowizard) to indicate that the package should never ask for (re)configuration and assume that the configuration is managed externally (e.g. through Ansible, custom shell scripts, etc.) ?
That way, once configured, the administrator could prevent further interactive reconfiguration by touching this .nowizard file ?
Inventory log file ( optional )
N/A
The text was updated successfully, but these errors were encountered:
General informations
Operating system : Ubuntu 20.04, 22.04, 24.04
Perl version : v5.30.0 (version do not really matter)
OCS Inventory informations
Unix agent version : 2.10.4
Problem's description
When the ocsinventory-agent DEB package is upgraded, either from the CLI (e.g. with
apt
orapt-get
commands) or from the GUI (e.g. with Ubuntu's "Gestionnaire de mises à jour" app), the package asksDo you want to configure the agent
, and if the user answer withy
, then the original configuration is lost.The problem is also most present when upgrading from the GUI app, as the prompt is hidden in the "Details" section that needs to be manually unfolded in order to provide an answer. Otherwise, the update will not finish and the package will ends up in
iF
status (installed / half-configured).I see that the DEB postinst script (
ocsinventory-agent.postinst
) do not prompt for reconfiguration (by forcing--nowizard
option) when theDEBIAN_FRONTEND
env var is set tononinteractive
.However, in my case, when the user performs the upgrade on its own, this condition is not met, so the user gets the prompt, and end up with a misconfigured agent.
Maybe the postinst script could also use a flag on the filesystem (e.g.
/etc/ocsinventory-agent/.nowizard
) to indicate that the package should never ask for (re)configuration and assume that the configuration is managed externally (e.g. through Ansible, custom shell scripts, etc.) ?That way, once configured, the administrator could prevent further interactive reconfiguration by touching this
.nowizard
file ?Inventory log file ( optional )
N/A
The text was updated successfully, but these errors were encountered: