Hi everyone,
while testing an update from UCS 4.2 to UCS 4.3 on a master with a new version of our app I have some uncommon problems.
Whenever I attempt to upgrade the installation of one of our packages fail. Further investiation showed that the problem is somewhere in joinscript_init in /usr/share/univention-join/joinscripthelper.lib.
The package in question executes our joinscript in postinst. The join script loads the mentioned library and runs the function.
For debugging I added set -x
and echo surrounding the function call in the join script.
This leads to the following output:
opsi4ucs (4.1.1.5-2) wird eingerichtet ...
File: /etc/pam.d/opsi-auth
Calling joinscript 99opsi4ucs.inst ...
+ echo 'before init'
before init
+ joinscript_init
++ readlink -f /usr/lib/univention-install/99opsi4ucs.inst
+ JS_SCRIPT_FULLNAME=/usr/lib/univention-install/99opsi4ucs.inst
++ date --rfc-3339=ns
+ echo '2018-10-11 17:29:23.788704992+02:00 (in joinscript_init)'
2018-10-11 17:29:23.788704992+02:00 (in joinscript_init)
+ joinscript_get_package_name
+ '[' '!' -f /usr/lib/univention-install/99opsi4ucs.inst ']'
++ echo /usr/lib/univention-install/99opsi4ucs
++ sed 's/.*\///'
++ sed 's/^[0-9][0-9]//'
+ JS_PACKAGE=opsi4ucs
+ '[' -z opsi4ucs ']'
+ return 0
+ joinscript_is_version 45
+ local var=45
+ '[' -z 45 ']'
++ echo 45
++ tr -d 0-9
+ '[' '!' -z '' ']'
+ '[' 45 -lt 1 ']'
+ return 0
+ joinscript_check_joinstatus
+ '[' '!' -f /var/univention-join/joined ']'
+ return 0
+ '[' -z '' ']'
+ joinscript_check_already_executed
+ joinscript_check_specific_version_executed 45
+ local version=45
+ joinscript_is_version 45
+ local var=45
+ '[' -z 45 ']'
++ echo 45
++ tr -d 0-9
+ '[' '!' -z '' ']'
+ '[' 45 -lt 1 ']'
+ return 0
+ touch /var/univention-join/status
+ grep -qs '^opsi4ucs v45 successful' /var/univention-join/status
+ return 0
+ return 0
+ exit 1
dpkg: Fehler beim Bearbeiten des Paketes opsi4ucs (--configure):
Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurĂĽck
dpkg: Abhängigkeitsprobleme verhindern Konfiguration von opsi4ucsappcenter:
opsi4ucsappcenter hängt ab von opsi4ucs (>= 4.1.1.5); aber:
Paket opsi4ucs ist noch nicht konfiguriert.
Please note that the join script in question has bash -e
as part of it’s shebang and it is intentionally.
An installation of the app on UCS 4.3 works fine if it wasn’t installed before on the system. It only happens during the upgrade from 4.2 to 4.3.
Looking into the problematic function did not make me any wiser.
Where could I look next to find out what is causing the problem? Do you have any ideas on what to try?