Update to UCS v4.4 fails with errors related to bind9 and samba-ad-dc packages
The update process fails with an error and you will see in
bind9 (1:9.10.3.dfsg.P4-12.3+deb9u5A~22.214.171.124905131414) wird eingerichtet ... insserv: Service samba-ad-dc has to be enabled to start service bind9 insserv: exiting now! update-rc.d: error: insserv rejected the script header
This error might happen as well to other packages as bind9.
This issue only happens on upgraded UCS systems having been on UCS 4.2.x earlier with the unmaintained repository enabled.
Root cause is the change from SysV init scripts to systemd in UCS 4.3. For UCS 4.3 the packages containing the SysV scripts move to unmaintained. But when being installed they do not get removed. Now upgrading bind9 checks if insserv packages are installed and updates these packages but they do not contain proper dependencies to up-to-date sysV init.
For new setups this will not happen as these packages are not installed. To prevent such issues there have been two fixes (fix1 and fix2) announced for UCS 4.3.
If you already run into this issue your can get through it with the following commands:
rm -f /etc/rcS.d/S??mountkernfs.sh sed -i -e '/^Required-St/s/samba-ad-dc//' /etc/init.d/bind9 dpkg --configure -a ucr set repository/online/unmaintained=no apt remove insserv apt remove initscripts
Then start the upgrade again.