#!/bin/sh # postrm script for cdc-mapper # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `purge' # * `upgrade' # * `failed-upgrade' # * `abort-install' # * `abort-install' # * `abort-upgrade' # * `disappear' # # for details, see https://www.debian.org/doc/debian-policy/ or # the debian-policy package #DEBHELPER# # Code copy from sssd package log() { echo "$*" } remove_nss_entry() { log "Checking NSS setup..." # abort if /etc/nsswitch.conf does not exist if ! [ -e /etc/nsswitch.conf ]; then log "Could not find /etc/nsswitch.conf." return fi sed -i --regexp-extended ' /^group:/ { s/\blliurex\b//g s/[[:space:]]+$// } ' /etc/nsswitch.conf } case "$1" in remove|purge) if [ "${DPKG_MAINTSCRIPT_PACKAGE_REFCOUNT:-1}" = 1 ]; then remove_nss_entry fi pam-auth-update --force --package n4d-cdc ;; 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. exit 0