diff options
Diffstat (limited to 'debian/vyos-libnss-mapuser.prerm')
-rw-r--r-- | debian/vyos-libnss-mapuser.prerm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/debian/vyos-libnss-mapuser.prerm b/debian/vyos-libnss-mapuser.prerm new file mode 100644 index 0000000..c4f259f --- /dev/null +++ b/debian/vyos-libnss-mapuser.prerm @@ -0,0 +1,16 @@ +#!/bin/sh + +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//' \ + -e '/^group:.*[ \t]mapname/s/[ \t]mapname//' \ + /etc/nsswitch.conf || true # don't prevent remove on error + fi +fi + +#DEBHELPER# |