Sorry -- the suggested fix was defective. This is better (the line with
the mail command is wrapped):
#!/bin/bash
. /etc/default/reboot-notifier
REBOOT_REQUIRED=/var/run/reboot-required
if [ -s $REBOOT_REQUIRED -a -n "$NOTIFICATION_EMAIL" ] ; then
BODY=$(<$REBOOT_REQUIRED)
BODY+=$'\nPackages requiring reboot:\n'
BODY+=$(</var/run/reboot-required.pkgs)
echo "$BODY" | mail -s "$HOSTNAME needs a reboot" $NOTIFICATION_EMAIL
fi
Subject to further live testing.
Charles
--
Aurinoco Systems
Auroville Foundation Bhavan
Auroville, Tamil Nadu 605101
+91 413 262 2222