#!/bin/sh set -e if [ -f /usr/share/debconf/confmodule ] && \ ( [ "$DEBCONF_USE_CDEBCONF" ] || perl -e "" 2>/dev/null ) then . /usr/share/debconf/confmodule else exit 0 fi #DEBHELPER# USERNAME=debian-security-support LIB_DIR="/var/lib/$USERNAME" ###################################################################### # # # WARNING: if you modify code here, you probably also need to modify # # ../check-support-status.hook # # # ###################################################################### case "$1" in configure) if [ "$TMPDIR" ] && [ "$(stat --format=%a "$TMPDIR")" != '1777' ] ; then export TMPDIR='/tmp' fi TEMPDIR="$(mktemp --tmpdir --directory debian-security-support.postinst.XXXXX)" trap "rm -rf '$TEMPDIR'" EXIT MODES="ended limited earlyend" for MODE in $MODES ; do OUTPUT="$TEMPDIR/output" runuser --user="$USERNAME" -- \ check-support-status \ --type "$MODE" \ --no-heading \ --status-db "$LIB_DIR/security-support.semaphore" \ >"$OUTPUT" if [ -s "$OUTPUT" ] ; then db_capb escape db_subst debian-security-support/$MODE MESSAGE "$(debconf-escape -e <"$OUTPUT")" db_input critical debian-security-support/$MODE || true db_go db_reset debian-security-support/$MODE fi done ;; abort-upgrade|abort-remove|abort-deconfigure) ;; triggered) ;; *) echo "postinst called with unknown argument '$1'" exit 1 ;; esac db_stop exit 0