]>
Commit | Line | Data |
---|---|---|
7d523701 | 1 | #!/bin/sh |
eb5a0437 | 2 | # preinst script for libnss-nonlocal-common |
7d523701 TA |
3 | # |
4 | # see: dh_installdeb(1) | |
5 | ||
6 | set -e | |
7 | ||
8 | # summary of how this script can be called: | |
9 | # * <new-preinst> `install' | |
10 | # * <new-preinst> `install' <old-version> | |
11 | # * <new-preinst> `upgrade' <old-version> | |
12 | # * <old-preinst> `abort-upgrade' <new-version> | |
13 | # for details, see http://www.debian.org/doc/debian-policy/ or | |
14 | # the debian-policy package | |
15 | ||
16 | ||
17 | case "$1" in | |
18 | install|upgrade) | |
e6daaa98 AK |
19 | if ! getent passwd nss-nonlocal-users >/dev/null; then |
20 | adduser --system --no-create-home --home /nonexistent \ | |
21 | --gecos 'Magic user for local group whitelist' \ | |
22 | nss-nonlocal-users | |
23 | fi | |
7d523701 TA |
24 | if ! getent group nss-local-users >/dev/null; then |
25 | addgroup --system nss-local-users | |
26 | fi | |
27 | if ! getent group nss-nonlocal-users >/dev/null; then | |
28 | addgroup --system nss-nonlocal-users | |
29 | fi | |
30 | ;; | |
31 | ||
32 | abort-upgrade) | |
33 | ;; | |
34 | ||
35 | *) | |
36 | echo "preinst called with unknown argument \`$1'" >&2 | |
37 | exit 1 | |
38 | ;; | |
39 | esac | |
40 | ||
41 | # dh_installdeb will replace this with shell code automatically | |
42 | # generated by other debhelper scripts. | |
43 | ||
44 | #DEBHELPER# | |
45 | ||
46 | exit 0 | |
47 | ||
48 | ||
49 | ||
50 |