summaryrefslogtreecommitdiff
path: root/debian/radius-shell.postrm
blob: 89ae97f0792e62437405134f7b2da61b1f87c2c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /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
        ;;
esac

#DEBHELPER#