#!/bin/sh
# Ksplice: don't notify about reboots required by kernel upgrades

if echo "$DPKG_MAINTSCRIPT_PACKAGE" | grep -q "^linux-image-"; then
    # Add another line to the list of reboots we've saved.
    echo "$DPKG_MAINTSCRIPT_PACKAGE" $(date) >> /var/cache/uptrack/reboots_saved
    # kernel-image packages in /var/run/reboot-required.pkgs.ksplice-orig will
    # be re-processed by update-notifier upon uninstallation.
    echo "$DPKG_MAINTSCRIPT_PACKAGE" >> /var/run/reboot-required.pkgs.ksplice-orig
elif echo "$DPKG_MAINTSCRIPT_PACKAGE" | grep -q "^libssl0.9.8"; then
    # Work around LP #244250, a bug in libssl configure script that
    # sends a reboot notification unnecessarily.
    true
else
    if [ -x /usr/share/update-notifier/notify-reboot-required.ksplice-orig ]; then
	/usr/share/update-notifier/notify-reboot-required.ksplice-orig "$@"
    fi
fi
