This file is indexed.

postinst is in opennebula 3.4.1-4.1ubuntu1.

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
42
43
44
45
#!/bin/sh

set -e

ONEHOME=/var/lib/one
ONEAUTH=$ONEHOME/.one/one_auth
ONE_GROUP=cloud
ONE_USER=oneadmin

if [ "$1" = "configure" ]; then

    # Use dpkg-statoverride instead of direct chmod/chown
    if ! dpkg-statoverride --list /var/log/one >/dev/null 2>&1; then
         dpkg-statoverride --update --add $ONE_USER root 755 /var/log/one
    fi
    if ! dpkg-statoverride --list $ONEHOME/datastores/1 >/dev/null 2>&1; then
         # sticky bit + setgid
         dpkg-statoverride --update --add $ONE_USER root 3770 $ONEHOME/datastores/1
    fi
    if ! dpkg-statoverride --list $ONEHOME/datastores/0 >/dev/null 2>&1; then
         # sticky bit + setgid
         dpkg-statoverride --update --add $ONE_USER root 3770 $ONEHOME/datastores/0
    fi
    if ! dpkg-statoverride --list $ONEHOME/.one >/dev/null 2>&1; then
         dpkg-statoverride --update --add $ONE_USER $ONE_GROUP 700 $ONEHOME/.one
    fi

    if [ ! -f $ONEAUTH ]; then
        ONE_PASSWORD=`apg -m 12 -M cNl -n 1`
        if [ -n "${ONE_PASSWORD}" ]; then
            echo "${ONE_USER}:${ONE_PASSWORD}" > $ONEAUTH
            chown $ONE_USER:$ONE_GROUP $ONEAUTH
            chmod 600 $ONEAUTH
        fi
    fi
fi

# Automatically added by dh_installinit
if [ -x "/etc/init.d/opennebula" ] || [ -e "/etc/init/opennebula.conf" ]; then
	if [ ! -e "/etc/init/opennebula.conf" ]; then
		update-rc.d opennebula defaults >/dev/null
	fi
	invoke-rc.d opennebula start || exit $?
fi
# End automatically added section