diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 04:42:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 04:42:34 +0000 |
commit | 1d6d8671262dc6b2a4e02e4a1878d91b86647054 (patch) | |
tree | 802f631f1abc6181cc842079844c15d37a54b14f /autoscripts/postrm-nss-db | |
parent | Initial commit. (diff) | |
download | dh-nss-1d6d8671262dc6b2a4e02e4a1878d91b86647054.tar.xz dh-nss-1d6d8671262dc6b2a4e02e4a1878d91b86647054.zip |
Adding upstream version 1.7.upstream/1.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'autoscripts/postrm-nss-db')
-rw-r--r-- | autoscripts/postrm-nss-db | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/autoscripts/postrm-nss-db b/autoscripts/postrm-nss-db new file mode 100644 index 0000000..c5a9e70 --- /dev/null +++ b/autoscripts/postrm-nss-db @@ -0,0 +1,6 @@ +: "${DPKG_MAINTSCRIPT_PACKAGE_INSTCOUNT:=$(dpkg-query -f '${db:Status-Abbrev}\n' -W "$DPKG_MAINTSCRIPT_PACKAGE" | grep -c '^i')}" +if { [ "$1" = "remove" ] || [ "$1" = "purge" ] ; } && [ -e "${DPKG_ROOT}/etc/nsswitch.conf" ] && [ "$DPKG_MAINTSCRIPT_PACKAGE_INSTCOUNT" -eq 0 ] ; then + if grep -q -E '^#DB#:\s*$' "${DPKG_ROOT}/etc/nsswitch.conf" ; then + sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" -e '/^#DB#:/d' + fi +fi |