Univention Bugzilla – Bug 55581
Missing reboot-file after kernel update
Last modified: 2023-01-19 10:06:22 CET
UCS 5.0-2 errata 541 Debian would need to create a /var/run/reboot-required file when installing/updating a kernel. With errata 5.0.2-541 the kernel 4.19.0-23 came, but due to lack of semaphore file our Ansible job did not reboot the machines.
Creating [/var]/run/reboot-required was and is not part of any standard Linux kernel; it only happens when Debian package "unattended-upgrades" is installed, which UCS does not install by default. It was maintained in UCS-4 but no longer is in UCS-5; see /usr/share/univention-errata-level/maintained-packages.txt Ansible is also unmaintained and not supported officially by UCS (core developers). If you require such functionality deploy something like the following script yourself: ± cat /etc/kernel/postinst.d/unattended-upgrades #!/bin/sh case "$DPKG_MAINTSCRIPT_PACKAGE::$DPKG_MAINTSCRIPT_NAME" in linux-image-extra*::postrm) exit 0;; esac if [ -d /var/run ]; then touch /var/run/reboot-required if ! grep -q "^$DPKG_MAINTSCRIPT_PACKAGE$" /var/run/reboot-required.pkgs 2> /dev/null ; then echo "$DPKG_MAINTSCRIPT_PACKAGE" >> /var/run/reboot-required.pkgs fi fi