#!/bin/sh set -e purge_debuginfod_debian() { for ext in sh csh; do [ -f /etc/profile.d/debuginfod."${ext}" ] || continue if command -v ucf > /dev/null; then ucf --purge /etc/profile.d/debuginfod."${ext}" fi if command -v ucfr > /dev/null; then ucfr --purge libdebuginfod-common /etc/profile.d/debuginfod."${ext}" fi rm -f /etc/profile.d/debuginfod."${ext}" done } purge_debuginfod_ubuntu() { CONFTEMPLATEPATH="/usr/share/libdebuginfod-common" for ext in sh csh; do [ -L "/etc/profile.d/debuginfod.${ext}" ] || continue # Only remove the file if it's a symlink to the file we # installed under ${CONFTEMPLATEPATH}. if [ "$(readlink -m /etc/profile.d/debuginfod.${ext})" \ = "${CONFTEMPLATEPATH}/debuginfod.${ext}" ]; then rm -f "/etc/profile.d/debuginfod.${ext}" fi done } case "$1" in purge) if grep -qFx "ID=debian" /etc/os-release; then purge_debuginfod_ubuntu elif grep -qFx "ID=ubuntu" /etc/os-release; then purge_debuginfod_ubuntu fi ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. # Automatically added by dh_installdebconf/13.11.8 if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule db_purge fi # End automatically added section exit 0