From 19008ab68d9d504aa58eb34d5f564755a1613b8b Mon Sep 17 00:00:00 2001 From: Dave Olson Date: Fri, 23 Jun 2017 14:07:35 -0700 Subject: Fixed remove to clean up plugin entries in nsswitch.conf We weren't removing the tacplus plugin from nsswitch.conf on package remove, now we do. Also cleaned up a bit and use \s instead of [ \t] for whitespace. For postinst, moved into configure case where it belonged. Updated changelog for recent fixes and bumped version --- debian/libnss-tacplus.postinst | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'debian/libnss-tacplus.postinst') diff --git a/debian/libnss-tacplus.postinst b/debian/libnss-tacplus.postinst index 9541608..77f16f4 100644 --- a/debian/libnss-tacplus.postinst +++ b/debian/libnss-tacplus.postinst @@ -7,6 +7,13 @@ set -e case "$1" in configure) + # Add tacplus to /etc/nsswitch.conf, since it's necessary + # for this package, and won't break anything else. Do nothing + # if tacplus is already present in the passwd line + if [ -e "/etc/nsswitch.conf" ]; then + sed -i -e '/tacplus\s/b' \ + -e '/^passwd:/s/compat/tacplus &/' /etc/nsswitch.conf + fi ;; abort-upgrade|abort-remove|abort-deconfigure) @@ -18,14 +25,6 @@ case "$1" in ;; esac -# Add tacplus to /etc/nsswitch.conf, since it's necessary -# for this package, and won't break anything else. Do nothing -# if tacplus is already present in the passwd line -if [ -e "/etc/nsswitch.conf" ]; then - sed -i -e '/tacplus/b' \ - -e '/^passwd/s/compat/tacplus &/' /etc/nsswitch.conf -fi - #DEBHELPER# -- cgit v1.2.3