Skip to content

Commit

Permalink
Ship /etc/kernel/postinst.d hook to ensure the
Browse files Browse the repository at this point in the history
/var/run/reboot-required file is created (avoid the need to have
update-notifier-common installed)
  • Loading branch information
mvo5 committed Feb 6, 2015
1 parent a869e55 commit 4c755d7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 0 additions & 4 deletions README.md
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions debian/dirs
Expand Up @@ -2,3 +2,4 @@ usr/bin
var/log/unattended-upgrades
etc/logrotate.d
etc/apt/apt.conf.d
etc/kernel/postinst.d
5 changes: 5 additions & 0 deletions kernel/postinst.d/unattended-upgrades
@@ -0,0 +1,5 @@
#!/bin/sh

if [ -d /var/run ]; then
touch /var/run/reboot-required
fi
3 changes: 3 additions & 0 deletions setup.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python

import glob
from setuptools import setup
from DistUtilsExtra.command import (
build_extra,
Expand All @@ -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"])
],
Expand Down

0 comments on commit 4c755d7

Please sign in to comment.