Univention Bugzilla – Bug 40913
[univention-system-activation] Remove call to dpkg-reconfigure from postinst
Last modified: 2016-07-07 14:31:30 CEST
Currently, a call to dpkg-reconfigure univention-pam is executed in the postinst script of univention-system-activation (introduced by r68147). The check for the installation status of univention-pam via "dpkg -l" is not ideal, better would be: ---------- 8< ----------- reconf_dpkg () { [ -z "${DPKG_MAINTSCRIPT_PACKAGE:-}" ] || return case "$(dpkg-query -f '${Status}' -W "$1" 2>/dev/null)" in *' ok installed') dpkg-reconfigure "$1" esac } reconf_dpkg 'univention-pam' ---------- 8< ----------- The call to dpkg-reconfigure yields at setting PAM UCR variable to their default values as those are not set since values are given via the force layer by univention-system-activation. It would be therefore even better to extract these logic from the postinst script of univention-pam into a separate script that can be executed by univention-system-activation without any call to dpkg tools.
I looked at package again and I think we actually don't need that logic anymore at all. "univention-system-activation start" is now first called in a hook and not in the postinst. That means that "univention-pam" should have no problems setting its default values and there should be no need to reconfigure the package. Adding "univention-pam" as a dependency should ensure that the default values are set before they are overwritten by "univention-system-activation start".
(In reply to Jürn Brodersen from comment #1) > I looked at package again and I think we actually don't need that logic > anymore at all. > "univention-system-activation start" is now first called in a hook and not > in the postinst. > That means that "univention-pam" should have no problems setting its default > values and there should be no need to reconfigure the package. > Adding "univention-pam" as a dependency should ensure that the default > values are set before they are overwritten by "univention-system-activation > start". "univention-system-activation restrict-root" will be called when building an appliance image. This restricts the access to the machine. Therefore, this logic is still relevant.
*** This bug has been marked as a duplicate of bug 40728 ***
Reopened because bug 40728 is fixed.
r70519: "dpkg-reconfigure univention-pam" not necessary anymore Package: univention-system-activation Version: 1.0.1-11.59.201606221019 Branch: ucs_4.1-0 Scope: errata4.1-2 r70520: YAML
Changes: OK, look good! Functional tests together with the generic appliance tests. YAML: I adjusted the entry [r70774] as the entry was too detailed. → VERIFIED
<http://errata.software-univention.de/ucs/4.1/209.html>