Univention Bugzilla – Bug 33138
do not die in unoin scripts
Last modified: 2013-11-19 06:41:33 CET
I have an UCS 3.2 appliance, with the samba4 packages (default software from the installer). Now i want to setup a slave without samba4. The setup removes the packages and the unjoin script is copied to /usr/lib/univention-install. But now i get an error from the unjoin script when joining the system (samba4 was never really installed on the system). Configure 90univention-bind-post.inst ^[[60Gdone __MSG__:Einrichten von 98univention-pkgdb-tools __STEP__:38 Configure 98univention-pkgdb-tools.inst ^[[60Gdone __MSG__:Einrichten von 03univention-s4-connector.uinst __STEP__:39 Configure 03univention-s4-connector.uinst ^[[60Gfailed ************************************************************************** * Join failed! * * Contact your system administrator * ************************************************************************** __JOINERR__:FAILED: 03univention-s4-connector.uinst * Message: FAILED: 03univention-s4-connector.uinst ************************************************************************** Happens also if a service (with join and unjoin scripts) is installed and deinstalled without joining. The unjoin script of this service is executed on the next join (run-join-scripts) and if there is something like ucs_removeServiceFromLocalhost "$SERVICE" "$@" || die the join "fails" (because the service was never added).
I would prefer a check in ucs_removeServiceFromHost if the service is registered and ignore the case the service is not registered. Alternative we add a new function ucs_isServiceRegisteredAtHost / Localhost and add this test to every unjoin script.
ucs_removeServiceFromHost() now checks for the existence of the service entry before removing it. r45870 | Bug #33138: lib: Fix service removal univention-lib_3.0.26-1.196.201311071135 Changelog: r45871 | Bug #33138: lib: Fix service removal The function <function>ucs_removeServiceFromHost</function> was made idempotent and can now also be used when the service does not exist
Adding the check for missing arguments broke it; remove double shift r45891 | Bug #33138: lib: Fix double shift in service removal univention-lib_3.0.26-2.197.201311071608
OK
UCS 3.2 has been released: http://docs.univention.de/release-notes-3.2-en.html http://docs.univention.de/release-notes-3.2-de.html If this error occurs again, please use "Clone This Bug".