diff options
author | Dave Olson <olson@cumulusnetworks.com> | 2017-06-23 13:05:34 -0700 |
---|---|---|
committer | Dave Olson <olson@cumulusnetworks.com> | 2017-06-23 14:08:45 -0700 |
commit | aed895b601c7a176bf1d97e35836dbe6b40e4932 (patch) | |
tree | ae0bedc283898e6af0073ce5a842a762f5d1db0a /debian/libnss-mapuser.prerm | |
parent | c80f0d55431b4f373d1672b82a4dae46fef3865c (diff) | |
download | libnss-mapuser-aed895b601c7a176bf1d97e35836dbe6b40e4932.tar.gz libnss-mapuser-aed895b601c7a176bf1d97e35836dbe6b40e4932.zip |
Fixed remove to clean up plugin entries in nsswitch.conf
Ticket: CM-16909
Reviewed By: nobody
Testing Done: installed, upgraded, removed
We weren't removing the mapuser plugins in nsswitch.conf on package remove,
now we do.
Also cleaned up a bit and use \s instead of [ \t] for whitespace.
Diffstat (limited to 'debian/libnss-mapuser.prerm')
-rw-r--r-- | debian/libnss-mapuser.prerm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/debian/libnss-mapuser.prerm b/debian/libnss-mapuser.prerm index c9bb6b1..af98f1b 100644 --- a/debian/libnss-mapuser.prerm +++ b/debian/libnss-mapuser.prerm @@ -4,6 +4,12 @@ set -e if [ "$1" = remove ]; then pam-auth-update --package --remove mapuser + # Undo the addition of the plugins + if [ -e "/etc/nsswitch.conf" ]; then + sed -i -e '/^passwd:.*mapuid[ \t]/s/mapuid[ \t]//' \ + -e '/^passwd:.*[ \t]mapname/s/[ \t]mapname//' \ + /etc/nsswitch.conf || true # don't prevent remove on error + fi fi #DEBHELPER# |