diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2025-04-14 12:41:12 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-14 12:41:12 +0300 |
commit | 061f717becc0c8bdf213316e32e031f5fb8f7d3b (patch) | |
tree | 3048a9a17c1b3433cb331da34a82dab38f5b201a /debian/vyos-radius-shell.postrm | |
parent | 86fe45df9cd2a461f646b92eb98c4c7b07ee7fed (diff) | |
parent | 952838bf73d6a919ec54e38202e7eabec0988692 (diff) | |
download | libpam-radius-auth-current.tar.gz libpam-radius-auth-current.zip |
packaging: T7336: add missing renamed for the radius-shell package
Diffstat (limited to 'debian/vyos-radius-shell.postrm')
-rw-r--r-- | debian/vyos-radius-shell.postrm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/debian/vyos-radius-shell.postrm b/debian/vyos-radius-shell.postrm new file mode 100644 index 0000000..d073b68 --- /dev/null +++ b/debian/vyos-radius-shell.postrm @@ -0,0 +1,26 @@ +#! /bin/sh + +set -e + +# we depend on libnss-mapuser, so that the radius group will have been +# created before this script runs. + +case "$1" in + remove|purge) + # fixup the shell for the users we may have modified on installation, + # if still present, and using our shell + for usr in radius_user radius_priv_user; do + uent="$(getent -s compat passwd $usr 2>/dev/null)" || true + [ -z "$uent" ] && continue + case "$uent" in + *${radshell}*) chsh -s /bin/bash $usr ;; + esac + done + if [ -x /usr/sbin/remove-shell ] && [ -f /etc/shells ]; then + /usr/sbin/remove-shell /sbin/radius_shell + fi + ;; +esac + +#DEBHELPER# + |