source: trunk/debathena/debathena/libnss-nonlocal/debian/libnss-nonlocal.preinst @ 25083

Revision 25083, 1.1 KB checked in by andersk, 13 years ago (diff)
In nss_nonlocal: * New upstream release. - Fix errno saving and restoring. - Document nss-nonlocal-users and nss-local-users groups in README. - Allow local whitelisting of nonlocal user and group memberships, using the magic local ‘nss-nonlocal-users’ user and group. * Create magic ‘nss-nonlocal-users’ user. * Remove obsolete exclusion of glibc-private dependency. * Use automake 1.10 and autoconf 2.61. * Add multiarch support for distros from the future. * Disable dh_buildinfo, which currently fails at multiarch. Full history: git://andersk.mit.edu/nss_nonlocal.git debian/2.0-0debathena1
Line 
1#!/bin/sh
2# preinst script for libnss-nonlocal
3#
4# see: dh_installdeb(1)
5
6set -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
17case "$1" in
18    install|upgrade)
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
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        ;;
39esac
40
41# dh_installdeb will replace this with shell code automatically
42# generated by other debhelper scripts.
43
44#DEBHELPER#
45
46exit 0
47
48
49
50
Note: See TracBrowser for help on using the repository browser.