diff --git a/README.md b/README.md index c056903a..530e2847 100644 --- a/README.md +++ b/README.md @@ -204,10 +204,6 @@ Supported Options Reference Automatically reboot *WITHOUT CONFIRMATION* if the file /var/run/reboot-required is found after the upgrade - Please note that you need the update-notifier-common package (only - available in Ubuntu) or a custom hook in /etc/kernel/postinst.d to - generate the reboot-required file. - * `Acquire::http::Dl-Limit` - integer (default:0) Use apt bandwidth limit feature when fetching the upgrades. The diff --git a/debian/dirs b/debian/dirs index 59b88815..ff6cead1 100644 --- a/debian/dirs +++ b/debian/dirs @@ -2,3 +2,4 @@ usr/bin var/log/unattended-upgrades etc/logrotate.d etc/apt/apt.conf.d +etc/kernel/postinst.d \ No newline at end of file diff --git a/kernel/postinst.d/unattended-upgrades b/kernel/postinst.d/unattended-upgrades new file mode 100755 index 00000000..7a995b48 --- /dev/null +++ b/kernel/postinst.d/unattended-upgrades @@ -0,0 +1,5 @@ +#!/bin/sh + +if [ -d /var/run ]; then + touch /var/run/reboot-required +fi diff --git a/setup.py b/setup.py index 1e39c912..7aba67e1 100755 --- a/setup.py +++ b/setup.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +import glob from setuptools import setup from DistUtilsExtra.command import ( build_extra, @@ -24,6 +25,8 @@ ["man/unattended-upgrade.8"]), ('../etc/pm/sleep.d/', ["pm/sleep.d/10_unattended-upgrades-hibernate"]), + ('../etc/kernel/postinst.d/', + glob.glob("kernel/postinst.d/*")), ('../usr/share/apport/package-hooks/', ["debian/source_unattended-upgrades.py"]) ],