Source: linux
Version: 5.17.3-1
Severity: wishlist
X-Debbugs-Cc: bts.to.frankeng...@spamgourmet.com

Dear Maintainer,

in #919507 Debian Policy Manual was amended with a signal facility that a
reboot is required. For kernel images this signal had been in
unattended-upgrades and was kept there. This decision isn't suitable for
environments without the unattended-upgrades package. As this signal is
the result of each image install, the postinst scripts of image packages
seem the right place to implement this functionality:

diff --git a/debian/templates/image.postinst.in 
b/debian/templates/image.postinst.in
index 25e7dd6..1c606ee 100755
--- a/debian/templates/image.postinst.in
+++ b/debian/templates/image.postinst.in
@@ -22,4 +22,11 @@ if [ -d /etc/kernel/postinst.d ]; then
              --arg=$image_path /etc/kernel/postinst.d
 fi
 
+if [ -d /run ]; then
+    touch /run/reboot-required
+    if ! grep -q "^$DPKG_MAINTSCRIPT_PACKAGE$" /run/reboot-required.pkgs 2> 
/dev/null ; then
+        echo "$DPKG_MAINTSCRIPT_PACKAGE" >> /run/reboot-required.pkgs
+    fi
+fi
+
 exit 0


Thanks

Reply via email to