This file is indexed.

postinst is in manila-common 2014.1~git20140220-0ubuntu12.

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
#!/bin/sh -e

if [ "$1" = "configure" ]; then
    if ! getent group manila > /dev/null 2>&1; then
        addgroup --system manila >/dev/null
    fi

    if ! getent passwd manila > /dev/null 2>&1; then
        adduser --system --home /var/lib/manila --ingroup manila --no-create-home \
            --shell /bin/false manila
    fi

    chown -R manila:adm /var/log/manila
    chmod 0750 /var/log/manila
    chown -R manila:manila /var/lib/manila /etc/manila
    chmod 0750 /etc/manila
    chmod 0440 /etc/sudoers.d/manila_sudoers
    chown -R root:root /etc/manila/rootwrap.d
    chmod 0755 /etc/manila/rootwrap.d
    chown root:root /etc/manila/rootwrap.conf

    if ! grep -q sql_connection /etc/manila/manila.conf
    then
        su -s /bin/sh -c 'manila-manage db sync' manila
    fi

    if [ -e /var/lib/manila/manila.sqlite ]; then
        chown manila:manila /var/lib/manila/manila.sqlite
        chmod 0600 /var/lib/manila/manila.sqlite
    fi
fi