This file is indexed.

postinst is in davfs2 1.5.2-1.2.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 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
#!/bin/sh -e
# postinst script for davfs2
. /usr/share/debconf/confmodule

case "$1" in
    configure)
        db_get davfs2/suid_file
        if [ "$RET" = "true" ]; then
            dpkg-statoverride --update --add root root 4755 \
                /usr/sbin/mount.davfs > /dev/null 2>&1 || true
        else
            dpkg-statoverride --remove /usr/sbin/mount.davfs \
                > /dev/null 2>&1 || true
            chmod u-s /usr/sbin/mount.davfs > /dev/null 2>&1 || true 
        fi

        sys_uid=$(getent passwd davfs2 | cut -d ':' -f 3)
        sys_gid=$(getent group davfs2 | cut -d ':' -f 3)
        if [ "$sys_uid" = "" -a "$sys_gid" = "" ]; then
            adduser --system --home "/var/cache/davfs2" --no-create-home \
                --group davfs2 > /dev/null 2>&1 || true
        elif [ "$sys_uid" = "" ]; then
            adduser --system --home "/var/cache/davfs2" --no-create-home \
                --ingroup davfs2 davfs2 > /dev/null 2>&1 || true
        elif [ "$sys_gid" = "" ]; then
            addgroup --system davfs2 > /dev/null 2>&1 || true
            usermod -g davfs2 davfs2 > /dev/null 2>&1 || true
        fi

        chown root:davfs2 /var/cache/davfs2 > /dev/null 2>&1 || true
        chown root:davfs2 /var/run/mount.davfs > /dev/null 2>&1 || true
        chmod 775 /var/cache/davfs2 > /dev/null 2>&1 || true
        chmod 1775 /var/run/mount.davfs > /dev/null 2>&1 || true

        for file in mount.davfs umount.davfs; do
            if [ ! -e /sbin/$file ]; then
                ln -s /usr/sbin/$file /sbin/$file
            fi
        done
    ;;
esac