I wrote a simple script for unattended-upgrade, which is run when an
interface (except loopback) is coming up.
It is modified from ntpdate in the same directory (/etc/network/if-up.d/).
Here it is:
# written by Leander Jedamus 24.09.2012
# gives me German messages
# Check whether unattended-upgrade was removed but not purged; it's
# wait for it in that case.
if [ ! -x $PROGRAM1 ] && [ -d $PROGRAMPATH ]; then
if [ ! -x $PROGRAM2 ] && [ -d $PROGRAMPATH ]; then
# This is for the case that /usr will be mounted later.
if [ -r /lib/udev/hotplug.functions ]; then
# Avoid running more than one at a time
if [ -x /usr/bin/lockfile-create ]; then
lockfile-touch $LOCKFILE &