File: dlt-daemon.postinst

package info (click to toggle)
dlt-daemon 3.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,296 kB
  • sloc: ansic: 58,041; cpp: 16,199; sh: 1,769; xml: 1,440; python: 376; makefile: 31
file content (44 lines) | stat: -rw-r--r-- 877 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
# postinst script for dlt

set -e

# Source the debconf shell library.
. /usr/share/debconf/confmodule

[ -z "$DLT_USER" ] && DLT_USER=_dlt
[ -z "$DLT_GROUP" ] && DLT_GROUP=_dlt

case "$1" in
    configure)

        if ! getent group $DLT_GROUP >/dev/null; then
            addgroup --force-badname --quiet --system $DLT_GROUP
        fi

        if ! getent passwd $DLT_USER; then
            adduser --force-badname \
	            --quiet \
                    --system \
                    --ingroup $DLT_GROUP \
                    --no-create-home \
                    --home /nonexistent \
                    --disabled-password \
                    $DLT_USER
        fi
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;

esac


#DEBHELPER#

exit 0