diff options
author | Daniil Baturin <daniil@vyos.io> | 2025-04-13 15:31:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-13 15:31:48 +0100 |
commit | 93195672035a655bbcfd9828abd69dae679d84c1 (patch) | |
tree | a86fb29d871f19e17b543b8fd14d7cb3d7e7df71 /debian/vyos-libnss-mapuser.prerm | |
parent | 5f734fc9e65e2c3de112d1d2be7b3ef94de0095d (diff) | |
parent | 02acf3932501e4ca775787bf0c86ef97a50c986d (diff) | |
download | libnss-mapuser-current.tar.gz libnss-mapuser-current.zip |
packaging: T7336: fix package install files
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# |